Commit e5a5bef2 by Torkel Ödegaard

mysql: minor update

parent d6d2080f
......@@ -14,8 +14,8 @@ func init() {
func sqlRandomWalk(m1 string, m2 string, intWalker int64, floatWalker float64, sess *session) error {
timeWalker := time.Now().Add(time.Hour * -1)
now := time.Now()
timeWalker := time.Now().UTC().Add(time.Hour * -1)
now := time.Now().UTC()
step := time.Minute
row := &m.SqlTestData{
......
......@@ -61,7 +61,7 @@ func (e *MysqlExecutor) initEngine() error {
}
}
cnnstr := fmt.Sprintf("%s:%s@%s(%s)/%s?charset=utf8mb4", e.datasource.User, e.datasource.Password, "tcp", e.datasource.Url, e.datasource.Database)
cnnstr := fmt.Sprintf("%s:%s@%s(%s)/%s?charset=utf8mb4&parseTime=true&loc=UTC", e.datasource.User, e.datasource.Password, "tcp", e.datasource.Url, e.datasource.Database)
e.log.Debug("getEngine", "connection", cnnstr)
engine, err := xorm.NewEngine("mysql", cnnstr)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment