diff options
author | Unknwon <u@gogs.io> | 2015-08-20 00:12:43 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-08-20 00:12:43 +0800 |
commit | b846f195c11808d3ed302c4d854d5eb700fdf1dc (patch) | |
tree | bd997b47b3a3cc9f52d00d96c22a27826af00fc0 /models/action.go | |
parent | 87f5ca8e1f74616d9dc36a5f6fe57023444ed25c (diff) | |
download | gitea-b846f195c11808d3ed302c4d854d5eb700fdf1dc.tar.gz gitea-b846f195c11808d3ed302c4d854d5eb700fdf1dc.zip |
work #1500
Diffstat (limited to 'models/action.go')
-rw-r--r-- | models/action.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/models/action.go b/models/action.go index de7f93a973..0e336c372b 100644 --- a/models/action.go +++ b/models/action.go @@ -14,6 +14,8 @@ import ( "time" "unicode" + "github.com/go-xorm/xorm" + "github.com/gogits/gogs/modules/base" "github.com/gogits/gogs/modules/git" "github.com/gogits/gogs/modules/log" @@ -77,6 +79,13 @@ type Action struct { Created time.Time `xorm:"created"` } +func (a *Action) AfterSet(colName string, _ xorm.Cell) { + switch colName { + case "created": + a.Created = a.Created.UTC() + } +} + func (a Action) GetOpType() int { return int(a.OpType) } |