We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Extremely easy to override with a custom class when using Postgres as your database
class CustomDateTimePGPSymmetricKeyField(fields.DateTimePGPSymmetricKeyField): """ Overriding cast_type so `dumpdata` command exports timezone aware datetimes. """ cast_type = 'TIMESTAMPTZ'
but maybe this could be a setting? Or it could look at current USE_TZ setting?
The text was updated successfully, but these errors were encountered:
@steezeburger
Django treats all datetimes with timezone so this likely a bug by using the wrong cast type. Ref:
https://docs.djangoproject.com/en/3.1/topics/i18n/timezones/#postgresql
I think we can safely change over to TIMESTAMPTZ without any ill effects given that is what Django always uses. A PR is welcome to fix this.
TIMESTAMPTZ
Sorry, something went wrong.
Ah beat me to it! I forgot I forked this and fixed, but never got the tests running and forgot to submit the PR haha. Thanks for this!
@steezeburger still need to do a release -- install from master if you want it today.
Successfully merging a pull request may close this issue.
Extremely easy to override with a custom class when using Postgres as your database
but maybe this could be a setting? Or it could look at current USE_TZ setting?
The text was updated successfully, but these errors were encountered: