Fix the issue of incorrect insertion of data in non UTC time zone zero for numeric types

This commit is contained in:
CyJaySong 2023-10-28 10:13:11 +08:00
parent 9c82535c2e
commit 0311205d4d
1 changed files with 3 additions and 0 deletions

View File

@ -21,6 +21,9 @@ func FormatColumnTime(dialect Dialect, dbLocation *time.Location, col *schemas.C
if col.SQLType.IsNumeric() {
return 0, nil
}
if col.SQLType.Name == schemas.TimeStamp || col.SQLType.Name == schemas.TimeStampz {
t = time.Unix(0, 0)
}
}
tmZone := dbLocation