mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Improvements for supporting UI Location (#3146)
* improvements for supporting UI Location * improved the comment
This commit is contained in:
@@ -7,6 +7,7 @@ package models
|
||||
import (
|
||||
"time"
|
||||
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
api "code.gitea.io/sdk/gitea"
|
||||
|
||||
"github.com/go-xorm/builder"
|
||||
@@ -24,7 +25,7 @@ type TrackedTime struct {
|
||||
|
||||
// AfterLoad is invoked from XORM after setting the values of all fields of this object.
|
||||
func (t *TrackedTime) AfterLoad() {
|
||||
t.Created = time.Unix(t.CreatedUnix, 0).Local()
|
||||
t.Created = time.Unix(t.CreatedUnix, 0).In(setting.UILocation)
|
||||
}
|
||||
|
||||
// APIFormat converts TrackedTime to API format
|
||||
|
Reference in New Issue
Block a user