Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch to timezone aware timestamps #50

Merged
merged 1 commit into from
May 15, 2019
Merged

switch to timezone aware timestamps #50

merged 1 commit into from
May 15, 2019

Conversation

dcardamo
Copy link
Contributor

Best practice with postgres is to use timestamps with timezone handling.
This is done by using timestamptz instead of timestamp as the column
type.

With timestamp there is no understanding of timezones and so
applications need to do all the timezone handling themselves including
being consistent in what timezone they work with from release to
release.

With timestamptz postgres will convert any timestamp that comes in to be
in UTC format and then will convert that back to the session's timezone
when read back.

Best practice with postgres is to use timestamps with timezone handling.
This is done by using timestamptz instead of timestamp as the column
type.

With timestamp there is no understanding of timezones and so
applications need to do all the timezone handling themselves including
being consistent in what timezone they work with from release to
release.

With timestamptz postgres will convert any timestamp that comes in to be
in UTC format and then will convert that back to the session's timezone
when read back.
@dcardamo dcardamo requested a review from a team as a code owner May 12, 2019 16:25
@dcardamo
Copy link
Contributor Author

@stanislas-m stanislas-m merged commit 41f132d into gobuffalo:master May 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants