diff options
author | Unknwon <u@gogs.io> | 2016-07-23 20:24:44 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-07-23 20:24:44 +0800 |
commit | 250be011c769decc729ec7dcc318b24e0613e73d (patch) | |
tree | a9fa643a58e68d42a43ba67a61e6145a52adb1ec /models/repo.go | |
parent | 4e822c1911755a94fef22435d191b6ca57c6f467 (diff) |
Remove redundant Unix timestamp method call
Unix() already uses UTC as timezone
Diffstat (limited to 'models/repo.go')
-rw-r--r-- | models/repo.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/models/repo.go b/models/repo.go index e46b5443..44e22755 100644 --- a/models/repo.go +++ b/models/repo.go @@ -184,12 +184,12 @@ type Repository struct { } func (repo *Repository) BeforeInsert() { - repo.CreatedUnix = time.Now().UTC().Unix() + repo.CreatedUnix = time.Now().Unix() repo.UpdatedUnix = repo.CreatedUnix } func (repo *Repository) BeforeUpdate() { - repo.UpdatedUnix = time.Now().UTC().Unix() + repo.UpdatedUnix = time.Now().Unix() } func (repo *Repository) AfterSet(colName string, _ xorm.Cell) { @@ -533,12 +533,12 @@ type Mirror struct { } func (m *Mirror) BeforeInsert() { - m.NextUpdateUnix = m.NextUpdate.UTC().Unix() + m.NextUpdateUnix = m.NextUpdate.Unix() } func (m *Mirror) BeforeUpdate() { - m.UpdatedUnix = time.Now().UTC().Unix() - m.NextUpdateUnix = m.NextUpdate.UTC().Unix() + m.UpdatedUnix = time.Now().Unix() + m.NextUpdateUnix = m.NextUpdate.Unix() } func (m *Mirror) AfterSet(colName string, _ xorm.Cell) { |