format time when sqlTypeName is core.Varchar. Same with core.DateTime or core.TimeStamp

This commit is contained in:
DarthPestilane 2018-06-28 15:54:40 +08:00 committed by Lunny Xiao
parent 2513e09caa
commit 8a7477b552
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
1 changed files with 1 additions and 1 deletions

View File

@ -1621,7 +1621,7 @@ func (engine *Engine) formatTime(sqlTypeName string, t time.Time) (v interface{}
v = s[11:19]
case core.Date:
v = t.Format("2006-01-02")
case core.DateTime, core.TimeStamp:
case core.DateTime, core.TimeStamp, core.Varchar:
v = t.Format("2006-01-02 15:04:05")
case core.TimeStampz:
if engine.dialect.DBType() == core.MSSQL {