print time to debug
This commit is contained in:
parent
390027496c
commit
a5b09b30d0
2 changed files with 4 additions and 3 deletions
|
@ -1359,7 +1359,7 @@ func (c *Comment) AfterSet(colName string, _ xorm.Cell) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case "created":
|
case "created":
|
||||||
c.Created = c.Created.UTC()
|
fmt.Println(1, c.Created)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -252,7 +252,7 @@ func computeTimeDiff(diff int64) (int64, string) {
|
||||||
|
|
||||||
// TimeSincePro calculates the time interval and generate full user-friendly string.
|
// TimeSincePro calculates the time interval and generate full user-friendly string.
|
||||||
func TimeSincePro(then time.Time) string {
|
func TimeSincePro(then time.Time) string {
|
||||||
now := time.Now().UTC()
|
now := time.Now()
|
||||||
diff := now.Unix() - then.Unix()
|
diff := now.Unix() - then.Unix()
|
||||||
|
|
||||||
if then.After(now) {
|
if then.After(now) {
|
||||||
|
@ -272,7 +272,8 @@ func TimeSincePro(then time.Time) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func timeSince(then time.Time, lang string) string {
|
func timeSince(then time.Time, lang string) string {
|
||||||
now := time.Now().UTC()
|
now := time.Now()
|
||||||
|
fmt.Println(2, now)
|
||||||
|
|
||||||
lbl := i18n.Tr(lang, "tool.ago")
|
lbl := i18n.Tr(lang, "tool.ago")
|
||||||
diff := now.Unix() - then.Unix()
|
diff := now.Unix() - then.Unix()
|
||||||
|
|
Reference in a new issue