diff options
Diffstat (limited to 'modules/timeutil/timestamp.go')
-rw-r--r-- | modules/timeutil/timestamp.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/timeutil/timestamp.go b/modules/timeutil/timestamp.go index c8e0d4bdc1..c60d287fae 100644 --- a/modules/timeutil/timestamp.go +++ b/modules/timeutil/timestamp.go @@ -64,9 +64,8 @@ func (ts TimeStamp) AsLocalTime() time.Time { } // AsTimeInLocation convert timestamp as time.Time in Local locale -func (ts TimeStamp) AsTimeInLocation(loc *time.Location) (tm time.Time) { - tm = time.Unix(int64(ts), 0).In(loc) - return tm +func (ts TimeStamp) AsTimeInLocation(loc *time.Location) time.Time { + return time.Unix(int64(ts), 0).In(loc) } // AsTimePtr convert timestamp as *time.Time in Local locale |