From 250be011c769decc729ec7dcc318b24e0613e73d Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sat, 23 Jul 2016 20:24:44 +0800 Subject: Remove redundant Unix timestamp method call Unix() already uses UTC as timezone --- models/repo.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'models/repo.go') 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) { -- cgit v1.2.3