Undocumented
Class | datetimeobject |
Undocumented |
Class |
|
Template node class used by ``get_current_timezone_tag``. |
Class |
|
Template node class used by ``localtime_tag``. |
Class |
|
Template node class used by ``timezone_tag``. |
Exception |
|
Undocumented |
Function | do |
Convert a datetime to local time in a given time zone. |
Function | get |
Store the name of the current time zone in the context. |
Function | localtime |
Convert a datetime to local time in the active time zone. |
Function | localtime |
Force or prevent conversion of datetime objects to local time, regardless of the value of ``settings.USE_TZ``. |
Function | timezone |
Undocumented |
Function | timezone |
Enable a given time zone just for this block. |
Function | utc |
Convert a datetime to UTC. |
Variable | register |
Undocumented |
Convert a datetime to local time in a given time zone. The argument must be an instance of a tzinfo subclass or a time zone name. Naive datetimes are assumed to be in local time in the default time zone.
Store the name of the current time zone in the context. Usage:: {% get_current_timezone as TIME_ZONE %} This will fetch the currently active time zone and put its name into the ``TIME_ZONE`` context variable.
Convert a datetime to local time in the active time zone. This only makes sense within a {% localtime off %} block.
Force or prevent conversion of datetime objects to local time, regardless of the value of ``settings.USE_TZ``. Sample usage:: {% localtime off %}{{ value_in_utc }}{% endlocaltime %}
Enable a given time zone just for this block. The ``timezone`` argument must be an instance of a ``tzinfo`` subclass, a time zone name, or ``None``. If it is ``None``, the default time zone is used within the block. Sample usage:: {% timezone "Europe/Paris" %} It is {{ now }} in Paris. {% endtimezone %}