fix: time-zone issue, localhost issue
This commit is contained in:
@@ -66,9 +66,12 @@ func InitDbClient(dbType, dbUser, dbPassword, dbHost, dbPort, dbName, dbParam st
|
||||
DbClient.XEngine.SetConnMaxLifetime(DbClient.dbConnMaxLifetime)
|
||||
DbClient.XEngine.SetMaxIdleConns(DbClient.dbMaxIdleConns)
|
||||
DbClient.XEngine.SetMaxOpenConns(DbClient.dbMaxOpenConns)
|
||||
DbClient.XEngine.DatabaseTZ = time.Local // 必须
|
||||
DbClient.XEngine.TZLocation = time.Local // 必须
|
||||
if DbClient.IsShowSQL {
|
||||
DbClient.XEngine.ShowSQL(true)
|
||||
}
|
||||
|
||||
xEngine = DbClient.XEngine
|
||||
|
||||
return nil
|
||||
@@ -1423,7 +1426,7 @@ type NeVersion struct {
|
||||
}
|
||||
|
||||
func XormGetDataBySQL(sql string) (*[]map[string]string, error) {
|
||||
log.Debug("XormGetDataBySQL processing... ")
|
||||
//log.Debug("XormGetDataBySQL processing... ")
|
||||
|
||||
rows := make([]map[string]string, 0)
|
||||
rows, err := DbClient.XEngine.QueryString(sql)
|
||||
|
||||
Reference in New Issue
Block a user