Changes between Initial Version and Version 1 of Ticket #16906


Ignore:
Timestamp:
Sep 21, 2011, 2:22:44 PM (13 years ago)
Author:
Aymeric Augustin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #16906 – Description

    initial v1  
    1 r7946 introduced a `datetime_safe` module that provides a Python implementation of `datetime.[date|datetime].strftime` for dates before 1900.
     1While working on timezone support in Django, the inconsistency in these three functions surprised me: https://code.djangoproject.com/browser/django/trunk/django/db/backends/__init__.py#L714
     2
     3----
     4
     5In fact, r7946 introduced a `datetime_safe` module that provides a Python implementation of `datetime.[date|datetime].strftime` for dates before 1900.
    26
    37However, this is overkill for the purpose of just showing a `date` or `datetime` in ISO format (`%Y-%m-%d` and `%Y-%m-%d %H:%M:%S`). It makes the code needlessly complicated, sometimes inconistent, and inefficient. The `isoformat` method achieves the same result, works for any date, and is implemented in C.
Back to Top