Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #16392 -- Clarified docs of the "c" date format with regard to …

…naive datetime objects. Thanks, ybon.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16507 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 8066fced3398405c5c2153ca33b3441ef7e1b2dc 1 parent cb2d8cd
@jezdez jezdez authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 docs/ref/templates/builtins.txt
View
7 docs/ref/templates/builtins.txt
@@ -1251,7 +1251,10 @@ Available format strings:
A ``'AM'`` or ``'PM'``. ``'AM'``
b Month, textual, 3 letters, lowercase. ``'jan'``
B Not implemented.
- c ISO 8601 Format. ``2008-01-02T10:30:00.000123``
+ c ISO 8601 format. (Note: unlike others ``2008-01-02T10:30:00.000123+02:00``,
+ formatters, such as "Z", "O" or "r", or ``2008-01-02T10:30:00.000123`` if the datetime is naive
+ the "c" formatter will not add timezone
+ offset if value is a `naive datetime`_.)
d Day of the month, 2 digits with ``'01'`` to ``'31'``
leading zeros.
D Day of the week, textual, 3 letters. ``'Fri'``
@@ -1343,6 +1346,8 @@ used, without applying any localization.
.. versionchanged:: 1.2
Predefined formats can now be influenced by the current locale.
+.. _naive datetime: http://docs.python.org/library/datetime.html#datetime.tzinfo
+
.. templatefilter:: default
default
Please sign in to comment.
Something went wrong with that request. Please try again.