Commit 9c7456b0 by CaIon

enable mysql parseTime

parent 16e1b559
......@@ -52,6 +52,10 @@ func chooseDB() (*gorm.DB, error) {
}
// Use MySQL
common.SysLog("using MySQL as database")
// check parseTime
if !strings.Contains(dsn, "parseTime") {
dsn += "?parseTime=true"
}
return gorm.Open(mysql.Open(dsn), &gorm.Config{
PrepareStmt: true, // precompile SQL
})
......
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 sign in to comment