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/webhook.go | |
parent | 4e822c1911755a94fef22435d191b6ca57c6f467 (diff) | |
download | gitea-250be011c769decc729ec7dcc318b24e0613e73d.tar.gz gitea-250be011c769decc729ec7dcc318b24e0613e73d.zip |
Remove redundant Unix timestamp method call
Unix() already uses UTC as timezone
Diffstat (limited to 'models/webhook.go')
-rw-r--r-- | models/webhook.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/models/webhook.go b/models/webhook.go index 02bea5cf0b..79d60da3a2 100644 --- a/models/webhook.go +++ b/models/webhook.go @@ -102,12 +102,12 @@ type Webhook struct { } func (w *Webhook) BeforeInsert() { - w.CreatedUnix = time.Now().UTC().Unix() + w.CreatedUnix = time.Now().Unix() w.UpdatedUnix = w.CreatedUnix } func (w *Webhook) BeforeUpdate() { - w.UpdatedUnix = time.Now().UTC().Unix() + w.UpdatedUnix = time.Now().Unix() } func (w *Webhook) AfterSet(colName string, _ xorm.Cell) { @@ -239,7 +239,7 @@ func deleteWebhook(bean *Webhook) (err error) { } // DeleteWebhookByRepoID deletes webhook of repository by given ID. -func DeleteWebhookByRepoID(repoID, id int64) (error) { +func DeleteWebhookByRepoID(repoID, id int64) error { return deleteWebhook(&Webhook{ ID: id, RepoID: repoID, @@ -247,7 +247,7 @@ func DeleteWebhookByRepoID(repoID, id int64) (error) { } // DeleteWebhookByOrgID deletes webhook of organization by given ID. -func DeleteWebhookByOrgID(orgID, id int64) (error) { +func DeleteWebhookByOrgID(orgID, id int64) error { return deleteWebhook(&Webhook{ ID: id, OrgID: orgID, @@ -573,7 +573,7 @@ func (t *HookTask) deliver() { } defer func() { - t.Delivered = time.Now().UTC().UnixNano() + t.Delivered = time.Now().UnixNano() if t.IsSucceed { log.Trace("Hook delivered: %s", t.UUID) } else { |