#32513: SQLite3 Backend Falsly claims SQLite does not support Timezone aware
DateTimes
-------------------------------------+-------------------------------------
     Reporter:  Arthur Moore         |                    Owner:  udaykiran
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  3.1
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  datetime, timezone   |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Arthur Moore):

 * status:  closed => new
 * resolution:  invalid =>


Comment:

 I am sorry the discussion drifted off topic.  The system is **NOT**
 working as intended.  The ORM is explicitly blocking functionality
 supported by the database, and lying about the reason.  If the reason is
 the Django default DateTime object refuses to ever store timezones in the
 database, then it should say that at least.

 This is further exacerbated by the part where PostgreSQL's documentation
 says that it just silently converts all DateTimes to UTC prior to saving.
 I have not confirmed, but that would also silently mean that any
 PostgreSQL user with `USE_TZ = False` might be in for a surprise.

 I can see two approaches to solving this bug.

 * The SQLite backend's `adapt_datetimefield_value` is adjusted to support
 timezone aware DateTimes when `USE_TZ = False`.
 * Django as a whole should declare that when `USE_TZ = False`, a user may
 never save a Timezone aware DateTime.
   * That would involve adding checks to
 `BaseDatabaseOperations.adapt_datetimefield_value` and the PostgreSQL
 backend.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32513#comment:8>
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/071.b1fadc51cc3c3f01d9019f3c638788dd%40djangoproject.com.

Reply via email to