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

Timezones for DateTime fields #33

Open
tomchristie opened this issue Mar 5, 2019 · 1 comment
Open

Timezones for DateTime fields #33

tomchristie opened this issue Mar 5, 2019 · 1 comment

Comments

@tomchristie
Copy link
Member

No description provided.

@sloria
Copy link

sloria commented Aug 7, 2019

@tomchristie What are your thoughts on normalizing timezones to UTC on serialization? Most RDBMS's will return localized datetimes to clients

All timezone-aware dates and times are stored internally in UTC. They are converted to local time in the zone specified by the TimeZone configuration parameter before being displayed to the client.

https://www.postgresql.org/docs/11/datatype-datetime.html

I see that typesystem does not convert datetimes to UTC, and marshmallow recently changed to do the same.

But one could argue that UTC normalization is a view-level concern rather than model-level concern, so perhaps it makes sense for serialization libs to take care of this. What do you think?

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

No branches or pull requests

2 participants