mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #17255 -- Removed "as" prefix from new timezone template filter names for the sake of clarity. Cheers to Aymeric Augustin for bearing with me.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17107 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
9b1cb755a2
commit
6f66b55108
9 changed files with 54 additions and 40 deletions
|
@ -330,10 +330,10 @@ These filters accept both aware and naive datetimes. For conversion purposes,
|
|||
they assume that naive datetimes are in the default time zone. They always
|
||||
return aware datetimes.
|
||||
|
||||
.. templatefilter:: aslocaltime
|
||||
.. templatefilter:: localtime
|
||||
|
||||
aslocaltime
|
||||
~~~~~~~~~~~
|
||||
localtime
|
||||
~~~~~~~~~
|
||||
|
||||
Forces conversion of a single value to the current time zone.
|
||||
|
||||
|
@ -341,12 +341,12 @@ For example::
|
|||
|
||||
{% load tz %}
|
||||
|
||||
{{ value|aslocaltime }}
|
||||
{{ value|localtime }}
|
||||
|
||||
.. templatefilter:: asutc
|
||||
.. templatefilter:: utc
|
||||
|
||||
asutc
|
||||
~~~~~
|
||||
utc
|
||||
~~~
|
||||
|
||||
Forces conversion of a single value to UTC.
|
||||
|
||||
|
@ -354,10 +354,12 @@ For example::
|
|||
|
||||
{% load tz %}
|
||||
|
||||
{{ value|asutc }}
|
||||
{{ value|utc }}
|
||||
|
||||
astimezone
|
||||
~~~~~~~~~~
|
||||
.. templatefilter:: timezone
|
||||
|
||||
timezone
|
||||
~~~~~~~~
|
||||
|
||||
Forces conversion of a single value to an arbitrary timezone.
|
||||
|
||||
|
@ -368,7 +370,7 @@ For example::
|
|||
|
||||
{% load tz %}
|
||||
|
||||
{{ value|astimezone:"Europe/Paris" }}
|
||||
{{ value|timezone:"Europe/Paris" }}
|
||||
|
||||
.. _time-zones-migration-guide:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue