How to add timezone support in Django (1.5) admin

100 views
Skip to first unread message

Carlos Villavicencio

unread,
Nov 26, 2013, 4:30:19 PM11/26/13
to django...@googlegroups.com

I am using django 1.5 with pytz. Currently all the datetimes stored in the database are in UTC. The frontend application is timezone aware (users worldwide), that means that I store the user timezone in his profile. Administration is using the default timezone as in settings.py (UTC).

What about if I want to give access to some user in another timezone (say -5), so for his sake it would be perfect to convert the times to his timezone, even the inputs, so when he edit a field, an automatic conversion to UTC will performed to update the value in DB.

What would be the approach to perform this change/hack/configuration in django administrator so it set a session timezone.

Thank you all

Reply all
Reply to author
Forward
0 new messages