mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-03 00:45:22 +02:00
Remove redundant Unix timestamp method call
Unix() already uses UTC as timezone
This commit is contained in:
parent
4e822c1911
commit
250be011c7
13 changed files with 38 additions and 38 deletions
|
@ -64,13 +64,13 @@ type Issue struct {
|
|||
}
|
||||
|
||||
func (i *Issue) BeforeInsert() {
|
||||
i.CreatedUnix = time.Now().UTC().Unix()
|
||||
i.CreatedUnix = time.Now().Unix()
|
||||
i.UpdatedUnix = i.CreatedUnix
|
||||
}
|
||||
|
||||
func (i *Issue) BeforeUpdate() {
|
||||
i.UpdatedUnix = time.Now().UTC().Unix()
|
||||
i.DeadlineUnix = i.Deadline.UTC().Unix()
|
||||
i.UpdatedUnix = time.Now().Unix()
|
||||
i.DeadlineUnix = i.Deadline.Unix()
|
||||
}
|
||||
|
||||
func (issue *Issue) loadAttributes(e Engine) (err error) {
|
||||
|
@ -1046,7 +1046,7 @@ type Milestone struct {
|
|||
}
|
||||
|
||||
func (m *Milestone) BeforeInsert() {
|
||||
m.DeadlineUnix = m.Deadline.UTC().Unix()
|
||||
m.DeadlineUnix = m.Deadline.Unix()
|
||||
}
|
||||
|
||||
func (m *Milestone) BeforeUpdate() {
|
||||
|
@ -1056,8 +1056,8 @@ func (m *Milestone) BeforeUpdate() {
|
|||
m.Completeness = 0
|
||||
}
|
||||
|
||||
m.DeadlineUnix = m.Deadline.UTC().Unix()
|
||||
m.ClosedDateUnix = m.ClosedDate.UTC().Unix()
|
||||
m.DeadlineUnix = m.Deadline.Unix()
|
||||
m.ClosedDateUnix = m.ClosedDate.Unix()
|
||||
}
|
||||
|
||||
func (m *Milestone) AfterSet(colName string, _ xorm.Cell) {
|
||||
|
@ -1361,7 +1361,7 @@ type Attachment struct {
|
|||
}
|
||||
|
||||
func (a *Attachment) BeforeInsert() {
|
||||
a.CreatedUnix = time.Now().UTC().Unix()
|
||||
a.CreatedUnix = time.Now().Unix()
|
||||
}
|
||||
|
||||
func (a *Attachment) AfterSet(colName string, _ xorm.Cell) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue