From 6c2536b89c30ef1c99752abd50fdb3b5d2cd0691 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 20 Aug 2015 00:32:18 +0800 Subject: fix timezone --- models/action.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'models/action.go') diff --git a/models/action.go b/models/action.go index 0e336c37..2c08eebb 100644 --- a/models/action.go +++ b/models/action.go @@ -82,7 +82,8 @@ type Action struct { func (a *Action) AfterSet(colName string, _ xorm.Cell) { switch colName { case "created": - a.Created = a.Created.UTC() + now := time.Now() + a.Created = a.Created.Add(now.Sub(now.UTC())) } } -- cgit v1.2.3