You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
go-mysq-driver/mysql with parseTime=true does currently not recognize fractions of a second. You need to define a field as DATETIME(0) (or skip the precision) to make MySQL output the time without fractional part.
Can the parser be extended to recognize fractions?
The text was updated successfully, but these errors were encountered:
@arnehormann this change is not backward compatible because MySQL rounds time UP.
So when you don't use microsecond resolution and insert something like time.Now() into db, the stored time will be up to 1 second "in future".
Can we add a flag to disable this feature and restore v1.2.x behavior ?
Beginning with MySQL 5.6.4, a field of type DATETIME or TIMESTAMP can have a resolution up to one microsecond. See http://dev.mysql.com/doc/refman/5.6/en/datetime.html for details.
go-mysq-driver/mysql with parseTime=true does currently not recognize fractions of a second. You need to define a field as DATETIME(0) (or skip the precision) to make MySQL output the time without fractional part.
Can the parser be extended to recognize fractions?
The text was updated successfully, but these errors were encountered: