Skip to content
Snippets Groups Projects
Verified Commit fabb8c71 authored by Gabriel Zachmann's avatar Gabriel Zachmann
Browse files

fix wrong dates when db uses non-UTC tz

parent aa1f7c4f
No related branches found
No related tags found
No related merge requests found
Pipeline #323421 passed
......@@ -31,6 +31,7 @@
### Bugfixes
- Fixed a bug where wrong dates where returned if the database used a different timezone than UTC.
- Fixed a bug in `mytoken-migratedb` were empty databases could not be setup.
### Dependencies
......
......@@ -154,7 +154,8 @@ func connectDSN(dsn string) (*sqlx.DB, error) {
db.SetConnMaxLifetime(time.Minute * 4)
db.SetMaxOpenConns(10)
db.SetMaxIdleConns(10)
return db, nil
_, err = db.Exec(`SET time_zone="+0:00"`)
return db, err
}
// Transact does a database transaction for the passed function
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment