Skip to content

Commit

Permalink
🔧 fix: Disable MySQL parseTime parameter in database connection
Browse files Browse the repository at this point in the history
  • Loading branch information
MartialBE committed Jan 28, 2025
1 parent 51a12d2 commit b38afb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func chooseDB() (*gorm.DB, error) {
logger.SysLog("using MySQL as database")
// mysql 时区设置
dsn = dsnAddArg(dsn, "loc", localTimezone)
dsn = dsnAddArg(dsn, "parseTime", "true")
// dsn = dsnAddArg(dsn, "parseTime", "true")
return gorm.Open(mysql.Open(dsn), &gorm.Config{
PrepareStmt: true, // precompile SQL
})
Expand Down

0 comments on commit b38afb2

Please # to comment.