This repository has been archived on 2023-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
dex/storage/sql
Eric Chiang fd20b213bb storage: fix postgres timezone handling
Dex's Postgres client currently uses the `timestamp` datatype for
storing times. This lops of timezones with no conversion, causing
times to lose locality information.

We could convert all times to UTC before storing them, but this is
a backward incompatible change for upgrades, since the new version
of dex would still be reading times from the database with no
locality.

Because of this intrinsic issue that current Postgres users don't
save any timezone data, we chose to treat any existing installation
as corrupted and change the datatype used for times to `timestamptz`.
This is a breaking change, but it seems hard to offer an
alternative that's both correct and backward compatible.

Additionally, an internal flag has been added to SQL flavors,
`supportsTimezones`. This allows us to handle SQLite3, which doesn't
support timezones, while still storing timezones in other flavors.
Flavors that don't support timezones are explicitly converted to
UTC.
2016-12-16 11:46:49 -08:00
..
config_test.go cmd/dex: add logging config and serve logger for different modules. 2016-12-12 15:56:50 -08:00
config.go cmd/dex: add logging config and serve logger for different modules. 2016-12-12 15:56:50 -08:00
crud_test.go storage/sql: add a SQL storage implementation 2016-10-03 12:48:19 -07:00
crud.go *: fix comment typos found with github.com/client9/misspell 2016-12-13 12:23:16 -08:00
migrate_test.go cmd/dex: add logging config and serve logger for different modules. 2016-12-12 15:56:50 -08:00
migrate.go storage: fix postgres timezone handling 2016-12-16 11:46:49 -08:00
sql_test.go storage/sql: add a SQL storage implementation 2016-10-03 12:48:19 -07:00
sql.go storage: fix postgres timezone handling 2016-12-16 11:46:49 -08:00
standup.sh storage/sql: fix typo in keys query 2016-10-14 12:28:49 -07:00