summaryrefslogtreecommitdiffstats
path: root/modules/base
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-08-20 00:25:32 +0800
committerUnknwon <u@gogs.io>2015-08-20 00:25:32 +0800
commita5b09b30d0f97b7296f23940dc64fff5bf698988 (patch)
tree652867b32be1c6a99235914971a17046e2e76a09 /modules/base
parent390027496c26402c0e4cf985ea225dd7be0a2433 (diff)
downloadgitea-a5b09b30d0f97b7296f23940dc64fff5bf698988.tar.gz
gitea-a5b09b30d0f97b7296f23940dc64fff5bf698988.zip
print time to debug
Diffstat (limited to 'modules/base')
-rw-r--r--modules/base/tool.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/base/tool.go b/modules/base/tool.go
index 7cf0e85446..abf12791d3 100644
--- a/modules/base/tool.go
+++ b/modules/base/tool.go
@@ -252,7 +252,7 @@ func computeTimeDiff(diff int64) (int64, string) {
// TimeSincePro calculates the time interval and generate full user-friendly string.
func TimeSincePro(then time.Time) string {
- now := time.Now().UTC()
+ now := time.Now()
diff := now.Unix() - then.Unix()
if then.After(now) {
@@ -272,7 +272,8 @@ func TimeSincePro(then time.Time) 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")
diff := now.Unix() - then.Unix()