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
But doesn't work if the column to insert is TIME. Error same with #725 Incorrect datetime value: '0000-00-00' for column...
Skipping the append is not a solution because a zero time will be added like with date 0001-01-01 for data types that use a date and it's a work around is to insert 0000-00-00
This driver assumes time.Time represents unixtime, or date with time.
The driver can not distinguish you are using time.Time for time without date. So it can not be supported.
You should format the time value by yourself.
Issue description
The issue #725 was solved appending
0000-00-00
tob
mysql/packets.go
Line 1117 in 681ffa8
But doesn't work if the column to insert is
TIME
. Error same with #725Incorrect datetime value: '0000-00-00' for column...
Skipping the append is not a solution because a zero time will be added like with date
0001-01-01
for data types that use a date and it's a work around is to insert0000-00-00
Example code
Configuration
Driver version (or git SHA): v1.5.0
Go version: 1.13.9
Server version: MySQL 5.6
Server OS: Windows 10
The text was updated successfully, but these errors were encountered: