feature:Add mill-seconds for Auto time

This commit is contained in:
huzhao 2020-12-01 13:30:05 +08:00
parent acb337ba1f
commit 584b723590
1 changed files with 3 additions and 1 deletions

View File

@ -26,8 +26,10 @@ func FormatTime(dialect Dialect, sqlTypeName string, t time.Time) (v interface{}
} else {
v = t.Format(time.RFC3339Nano)
}
case schemas.BigInt, schemas.Int:
case schemas.Int:
v = t.Unix()
case schemas.BigInt: //Add mill-seconds
v = t.UnixNano()/1e6
default:
v = t
}