summaryrefslogtreecommitdiffstats
path: root/models/repo.go
diff options
context:
space:
mode:
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)