diff options
author | Yarden Shoham <git@yardenshoham.com> | 2023-04-12 09:29:49 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-12 02:29:49 -0400 |
commit | 97176754beb4de23fa0f68df715c4737919c93b0 (patch) | |
tree | daa2bba8a913fb607d567dffeac7795c3284a0ff /models/issues/milestone.go | |
parent | 8aada1849f949d0c7f023f11061cacc957e0df8f (diff) | |
download | gitea-97176754beb4de23fa0f68df715c4737919c93b0.tar.gz gitea-97176754beb4de23fa0f68df715c4737919c93b0.zip |
Localize milestone related time strings (#24051)
- With #23988 in place, we can improve these timestamps
---------
Co-authored-by: silverwind <me@silverwind.io>
Diffstat (limited to 'models/issues/milestone.go')
-rw-r--r-- | models/issues/milestone.go | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/models/issues/milestone.go b/models/issues/milestone.go index 8255db38f9..ffe5c8eb50 100644 --- a/models/issues/milestone.go +++ b/models/issues/milestone.go @@ -7,7 +7,6 @@ import ( "context" "fmt" "strings" - "time" "code.gitea.io/gitea/models/db" repo_model "code.gitea.io/gitea/models/repo" @@ -65,7 +64,6 @@ type Milestone struct { DeadlineString string `xorm:"-"` TotalTrackedTime int64 `xorm:"-"` - TimeSinceUpdate int64 `xorm:"-"` } func init() { @@ -84,9 +82,6 @@ func (m *Milestone) BeforeUpdate() { // AfterLoad is invoked from XORM after setting the value of a field of // this object. func (m *Milestone) AfterLoad() { - if !m.UpdatedUnix.IsZero() { - m.TimeSinceUpdate = time.Now().Unix() - m.UpdatedUnix.AsTime().Unix() - } m.NumOpenIssues = m.NumIssues - m.NumClosedIssues if m.DeadlineUnix.Year() == 9999 { return |