summaryrefslogtreecommitdiffstats
path: root/models/issue.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-07-23 20:24:44 +0800
committerUnknwon <u@gogs.io>2016-07-23 20:24:44 +0800
commit250be011c769decc729ec7dcc318b24e0613e73d (patch)
treea9fa643a58e68d42a43ba67a61e6145a52adb1ec /models/issue.go
parent4e822c1911755a94fef22435d191b6ca57c6f467 (diff)
downloadgitea-250be011c769decc729ec7dcc318b24e0613e73d.tar.gz
gitea-250be011c769decc729ec7dcc318b24e0613e73d.zip
Remove redundant Unix timestamp method call
Unix() already uses UTC as timezone
Diffstat (limited to 'models/issue.go')
-rw-r--r--models/issue.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/models/issue.go b/models/issue.go
index 189b207df3..74d5356150 100644
--- a/models/issue.go
+++ b/models/issue.go
@@ -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) {