mirror of https://github.com/statping/statping
Merge pull request #191 from arakelian/mysql-patch
Set MySQL time_zone setting to match local settingpull/194/head^2
commit
175f20aa9a
|
@ -194,7 +194,7 @@ func (db *DbConfig) Connect(retry bool, location string) error {
|
||||||
dbType = "sqlite3"
|
dbType = "sqlite3"
|
||||||
case "mysql":
|
case "mysql":
|
||||||
host := fmt.Sprintf("%v:%v", Configs.DbHost, Configs.DbPort)
|
host := fmt.Sprintf("%v:%v", Configs.DbHost, Configs.DbPort)
|
||||||
conn = fmt.Sprintf("%v:%v@tcp(%v)/%v?charset=utf8&parseTime=True&loc=UTC", Configs.DbUser, Configs.DbPass, host, Configs.DbData)
|
conn = fmt.Sprintf("%v:%v@tcp(%v)/%v?charset=utf8&parseTime=True&loc=UTC&time_zone=%%27UTC%%27", Configs.DbUser, Configs.DbPass, host, Configs.DbData)
|
||||||
case "postgres":
|
case "postgres":
|
||||||
sslMode := "disable"
|
sslMode := "disable"
|
||||||
if postgresSSL != "" {
|
if postgresSSL != "" {
|
||||||
|
|
Loading…
Reference in New Issue