#32513: SQLite3 Backend Falsly claims SQLite does not support Timezone aware
DateTimes
-------------------------------------+-------------------------------------
     Reporter:  Arthur Moore         |                    Owner:  udaykiran
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  3.1
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  invalid
     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 Carlton Gibson):

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


Comment:

 Hi Arthur — I'm going to close this as invalid, as I think it's a usage
 question (appropriate for the [https://forum.djangoproject.com forum] or
 django-users mailing list) rather than an issue with Django.

 From the description it's working as expected. With `USE_TZ = True` aware
 datetimes are converted to UTC before storage, usually from the current
 user's timezone, because they get created with that set, but in your case,
 you could create the datetime specifying the tz for the collection
 location. If you need to recreate the offset aware datetime later then you
 should store the location (to map to correct offsets) or store the offset
 itself in a separate field. You'll receive a UTC datetime from the DB, but
 can replace the tz as needed. TZ maths always needs thinking about but you
 should be able to `filter()` on the combination of the datetime and offset
 fields, if you're using that, as needed.

 I hope that helps. If you need more please do forum on one of the support
 channels.

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

Reply via email to