[Fixed]-Setting Django admin display times to local time?


In Django:

The default time zone is the time zone defined by the TIME_ZONE setting.

The current time zone is the time zone that’s used for rendering.

so you should set the “current time zone” use:


You can activate it in a middleware(don’t forger to register it to MIDDLEWARE in settings.py):

import pytz    
from django.utils import timezone

class TimezoneMiddleware:
    def __init__(self, get_response):
        self.get_response = get_response

    def __call__(self, request):
        return self.get_response(request)

This is only a simple hardcode. you can making a form to select tzinfo, store it in user’s profile and load it to user session, read the tzinfo from the session in the middleware.

The official documentation has a related description:




This isn’t supported natively in Django as of 2.1. However https://github.com/charettes/django-sundial may provide what you need — this adds a User.timezone model field so that you can configure it per-user.

(This middleware is very simple — under the covers it’s just calling timezone.activate(zone) to change the rendered site’s timezone).


You can override the template for your change_list.html, change_form.html, etc. and do something like:

{% extends "admin/change_list.html" %}
{% load tz %}

{% block content %}
    {% timezone "US/Eastern" %}
        {{ block.super }}
    {% endtimezone %}
{% endblock %}

Do it with one of those methods:



Maybe you can try to set user timezone.

 USE_TZ = True

Official documentation

Leave a comment