{% localtime %} Tag

turns datetime conversion on or off for a block.

Date and Time As Markdown

Argument(s)
on|off
Closing tag
Required — {% endlocaltime %}
Requires
{% load tz %}

Documentation

Controls whether datetimes inside the block are converted to the current time zone.

Template

{% load tz %}
{% localtime off %}
  {{ value }}
{% endlocaltime %}

With it off, aware datetimes render in UTC — occasionally what a log view or an API-ish page wants.

More Date and Time Tags

All Date and Time Tags


Did we get something wrong? Is there a use case for the localtime tag that we should add? Please let us know.

Send Feedback

Official Documentation
This page last updated on August 20, 2026