summaryrefslogtreecommitdiffstats
path: root/models/models.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/models.go')
-rw-r--r--models/models.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/models/models.go b/models/models.go
index 33459642d5..bcb621eb6e 100644
--- a/models/models.go
+++ b/models/models.go
@@ -55,7 +55,7 @@ func regulateTimeZone(t time.Time) time.Time {
return t
}
hour := com.StrTo(zone[2:3]).MustInt()
- minutes := com.StrTo(zone[3:4]).MustInt()
+ minutes := com.StrTo(zone[3:5]).MustInt()
if zone[0] == '-' {
return t.Add(time.Duration(hour) * time.Hour).Add(time.Duration(minutes) * time.Minute)
@@ -104,6 +104,8 @@ func LoadModelsConfig() {
setting.UseMySQL = true
case "postgres":
setting.UsePostgreSQL = true
+ case "tidb":
+ setting.UseTiDB = true
}
DbCfg.Host = sec.Key("HOST").String()
DbCfg.Name = sec.Key("NAME").String()