---
title: '|localtime'
description: converts a datetime to the current time zone.
date: '2026-08-21'
categories:
  - Filter
  - Date and Time
canonical: https://coolify.djangotemplatetagsandfilters.com/filters/localtime/
doc_link: >-
  https://docs.djangoproject.com/en/6.1/topics/i18n/timezones/#std-templatefilter-localtime
---

# |localtime

converts a datetime to the current time zone.

## Documentation

Converts one aware datetime to the current time zone, regardless of the surrounding `{% localtime %}` setting.

### Template

```django
{% load tz %}
{{ value|localtime }}
```
