Skip to content
Snippets Groups Projects
Unverified Commit 61fdebf4 authored by Gabriel Zachmann's avatar Gabriel Zachmann Committed by GitHub
Browse files

fix wrong dates when db uses non-UTC tz (#232)

parents 5f7f62aa fabb8c71
No related branches found
No related tags found
No related merge requests found
Pipeline #323431 failed
......@@ -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