Apply the given location instead of engine.location

This commit is contained in:
Shintaro Kaneko 2016-08-03 16:59:55 +00:00
parent 7c70e8caa9
commit 96aa149966
1 changed files with 2 additions and 0 deletions

View File

@ -1599,6 +1599,8 @@ func (engine *Engine) formatTime(tz *time.Location, sqlTypeName string, t time.T
return t return t
} }
if tz != nil { if tz != nil {
t = t.In(tz)
} else {
t = engine.TZTime(t) t = engine.TZTime(t)
} }
switch sqlTypeName { switch sqlTypeName {