Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #13547 -- Made sure the ISO 8601 date formatting introduced in …

…r12058 uses "T" as the separator between the date and the time value to increase real world usefulness.

While the ISO standard permits the use of a space instead of "T" for readability, it does have an impact on standards like HTML5 which rely on specific rules made in RFC 3339.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13266 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 34ddcd9939568e7d19a0059647a9faaf36972083 1 parent fa14e31
@jezdez jezdez authored
View
2  django/utils/dateformat.py
@@ -128,7 +128,7 @@ def c(self):
ISO 8601 Format
Example : '2008-01-02T10:30:00.000123'
"""
- return self.data.isoformat(' ')
+ return self.data.isoformat()
def d(self):
"Day of the month, 2 digits with leading zeros; i.e. '01' to '31'"
View
2  docs/ref/templates/builtins.txt
@@ -657,7 +657,7 @@ Available format strings:
A ``'AM'`` or ``'PM'``. ``'AM'``
b Month, textual, 3 letters, lowercase. ``'jan'``
B Not implemented.
- c ISO 8601 Format. ``2008-01-02 10:30:00.000123``
+ c ISO 8601 Format. ``2008-01-02T10:30:00.000123``
d Day of the month, 2 digits with ``'01'`` to ``'31'``
leading zeros.
D Day of the week, textual, 3 letters. ``'Fri'``
View
2  tests/regressiontests/dateformat/tests.py
@@ -42,7 +42,7 @@ def test_date_formats(self):
timestamp = datetime.datetime(2008, 5, 19, 11, 45, 23, 123456)
self.assertEquals(dateformat.format(my_birthday, 'A'), u'PM')
- self.assertEquals(dateformat.format(timestamp, 'c'), u'2008-05-19 11:45:23.123456')
+ self.assertEquals(dateformat.format(timestamp, 'c'), u'2008-05-19T11:45:23.123456')
self.assertEquals(dateformat.format(my_birthday, 'd'), u'08')
self.assertEquals(dateformat.format(my_birthday, 'j'), u'8')
self.assertEquals(dateformat.format(my_birthday, 'l'), u'Sunday')
Please sign in to comment.
Something went wrong with that request. Please try again.