func (a *Action) AfterSet(colName string, _ xorm.Cell) {
switch colName {
case "created":
- a.Created = a.Created.UTC()
+ now := time.Now()
+ a.Created = a.Created.Add(now.Sub(now.UTC()))
}
}
log.Error(3, "GetUserByID[%d]: %v", i.ID, err)
}
case "created":
- i.Created = i.Created.UTC()
+ now := time.Now()
+ i.Created = i.Created.Add(now.Sub(now.UTC()))
}
}
}
}
case "created":
- fmt.Println(1, c.Created)
+ now := time.Now()
+ c.Created = c.Created.Add(now.Sub(now.UTC()))
}
}
func timeSince(then time.Time, lang string) string {
now := time.Now()
- fmt.Println(2, now)
lbl := i18n.Tr(lang, "tool.ago")
diff := now.Unix() - then.Unix()