#23832: Storage API should provide a timezone aware approach
-------------------------------------+-------------------------------------
     Reporter:  jaylett              |                    Owner:
         Type:  New feature          |                   Status:  new
    Component:  File                 |                  Version:  1.7
  uploads/storage                    |               Resolution:
     Severity:  Normal               |             Triage Stage:
     Keywords:                       |  Unreviewed
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by jaylett):

 * needs_better_patch:  0 => 1


Comment:

 I share Aymeric's concern about comparison — it was also Denis' in
 https://code.djangoproject.com/ticket/22567 — and that's something that
 `collectstatic` has to do, so unless we ditch BC with third-party Storage
 implementers we'd have to convert naive to aware datetimes (assuming
 localtime) when we compare. `collectstatic` is the only time in core
 (well, `contrib.staticfiles`) that we use any of these methods, but again
 there may be third parties relying on the silent behaviour of naive
 timestamps and doing their own comparison or difference.

 +1 on `datetime.utcfromtimestamp`, and I can update the patch for that if
 we still want to tackle things in this way. If not, it's a much easier
 patch, although the documentation becomes more important to communicate
 the urgency of anyone using or implementing this API to update (and users
 with third-party extensions to upgrade).

 (Also noticed that there are more tests that should really be updated to
 implement the new API, so I've marked the patch as needing improvement
 anyway.)

--
Ticket URL: <https://code.djangoproject.com/ticket/23832#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 [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/065.8021b0f43698f7079f00ea2288573419%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to