Changes between Initial Version and Version 1 of Ticket #16906
- Timestamp:
- Sep 21, 2011, 2:22:44 PM (13 years ago)
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. 1 While 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 5 In fact, r7946 introduced a `datetime_safe` module that provides a Python implementation of `datetime.[date|datetime].strftime` for dates before 1900. 2 6 3 7 However, 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.