fix timezone
This commit is contained in:
parent
a5b09b30d0
commit
6c2536b89c
3 changed files with 6 additions and 4 deletions
|
@ -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()))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -93,7 +93,8 @@ func (i *Issue) AfterSet(colName string, _ xorm.Cell) {
|
|||
log.Error(3, "GetUserByID[%d]: %v", i.ID, err)
|
||||
}
|
||||
case "created":
|
||||
i.Created = i.Created.UTC()
|
||||
now := time.Now()
|
||||
i.Created = i.Created.Add(now.Sub(now.UTC()))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1359,7 +1360,8 @@ func (c *Comment) AfterSet(colName string, _ xorm.Cell) {
|
|||
}
|
||||
}
|
||||
case "created":
|
||||
fmt.Println(1, c.Created)
|
||||
now := time.Now()
|
||||
c.Created = c.Created.Add(now.Sub(now.UTC()))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue