Pull requests

#21 Merged
Repository
akava akava
Branch
default
Repository
slav0nic slav0nic
Branch
default

#74 Added timezone support

Author
  1. Andrei Kavaleu
Reviewers
Description

Added timezone support according to this guide: https://docs.djangoproject.com/en/dev/topics/i18n/timezones/

To enable it, base project settings should be extended:

  • enable tz support: USE_TZ = True
  • register middleware djangobb_forum.middleware.TimezoneMiddleware

There are 2 things to think about:

  • I hope, I found all the places that was required changes to show TZ aware date. But this is not the key of this point. The key is that I didn't find a place in the code that use profile.timezone object to adjust time to local. Looks like tz support was not implemented. I may be wrong and forum uses some tz conversion logic, in that case we need to remove this as I added my (and django) logic to do it.

  • All current users will loose their timezone settings. There is no simple way to convert old tz settings to new ones, as pytz uses names of geographic location, not time delta like we did.

Comments (0)