#20926: postgresql 'infinity' raises 'OverflowError: date value out of range'
if TZ
is east of UTC
-------------------------------+--------------------
Reporter: tim@… | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 1.5
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
When a datetime field is set to 'infinity' by an external application,
django will throw an 'OverflowError: date value out of range' when the
corresponding model object is modified within django the next time. This
only occurs, however, if the timezone which is set is not UTC (in my
Example 'Europe/Berlin').
The problem is, that django translates infinity to the maximum allowed
timestamp of 9999-12-31 23:59:59 but timezone unaware. When Django tries
to make the timestamp timezone aware, it uses the local timezone as
default, which makes the timestamp in UTC larger than the maximum allowed
timestamp, throwing the Exception.
I would guess, that this only applies for Timezones east of UTC.
--
Ticket URL: <https://code.djangoproject.com/ticket/20926>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/056.36d14963cbac4f28349a58fbf39ffc87%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.