You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to think about this more, I'll just explain why this works in a particular way at the moment and some ideas I have.
In the from_dict function, the DateTime is constructed using datetime.datetime.fromisoformat which does not support timezone information on the back of a format string.
The other thing that comes to mind is that SQLAlchemy doesn't recommend the use of timezone on DateTime, they recommend TIMESTAMP when timezone information is required instead. What comes to mind at the moment would be something like x-timestamp as a boolean and then to also include something like x-timezone as a boolean also. This would impact from_dict and to_dict as well as the autogenerated models file. My feeling is that this should be supported and that it would be a non-trivial change.
Pull requests welcome 😛. Happy to help and it would get you a very thorough understanding of the complete code base.
As a developer, I would like to have the ability to store the time zone associated to my
DateTime
objects.Currently, they look like this in the Alembic migrations:
But I would like to see:
The text was updated successfully, but these errors were encountered: