1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00
This commit is contained in:
Unknwon
2015-08-20 00:12:43 +08:00
parent 87f5ca8e1f
commit b846f195c1
2 changed files with 28 additions and 15 deletions

View File

@@ -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)
}