Browse Source

add log when cannot regulate time

tags/v1.21.12.1
Unknwon 10 years ago
parent
commit
f1c2276c8d
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      models/models.go

+ 2
- 0
models/models.go View File

@@ -20,6 +20,7 @@ import (
_ "github.com/lib/pq"

"github.com/gogits/gogs/models/migrations"
"github.com/gogits/gogs/modules/log"
"github.com/gogits/gogs/modules/setting"
)

@@ -52,6 +53,7 @@ func regulateTimeZone(t time.Time) time.Time {

zone := t.Local().Format("-0700")
if len(zone) != 5 {
log.Debug("Unprocessable time: %v", t.Local())
return t
}
hour := com.StrTo(zone[2:3]).MustInt()


Loading…
Cancel
Save