summaryrefslogtreecommitdiffstats
path: root/models/repo.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-08-20 20:18:49 +0800
committerUnknwon <u@gogs.io>2015-08-20 20:18:49 +0800
commitaa65761d81d3f33bdfee578c14bb2b0c7a6ca639 (patch)
tree8c86e0e58758bc10a737b503f8d92e62406adf06 /models/repo.go
parentd7c3c79c00425e89a71e6178076bc5828421244d (diff)
downloadgitea-aa65761d81d3f33bdfee578c14bb2b0c7a6ca639.tar.gz
gitea-aa65761d81d3f33bdfee578c14bb2b0c7a6ca639.zip
new commits table
Diffstat (limited to 'models/repo.go')
-rw-r--r--models/repo.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/models/repo.go b/models/repo.go
index e4122966d5..f99d28ccc6 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -166,6 +166,13 @@ type Repository struct {
Updated time.Time `xorm:"UPDATED"`
}
+func (repo *Repository) AfterSet(colName string, _ xorm.Cell) {
+ switch colName {
+ case "updated":
+ repo.Updated = regulateTimeZone(repo.Updated)
+ }
+}
+
func (repo *Repository) getOwner(e Engine) (err error) {
if repo.Owner == nil {
repo.Owner, err = getUserByID(e, repo.OwnerID)