Timezones can change - display the current tz offset

As noted in the reviews for the backport (20467), the initial patch
for bug 1103003 didn't account for timezones changing over time.

Change-Id: Iceab7deb803669c56aa21252561f650f8c4a601d
This commit is contained in:
Julie Pichon 2013-02-08 16:50:02 +00:00
parent 1d99475ef9
commit dadf4f7d06
2 changed files with 2 additions and 1 deletions

View File

@ -39,7 +39,7 @@ class UserSettingsForm(forms.SelfHandlingForm):
self.fields['language'].choices = languages
# Timezones
d = datetime(2011, 1, 1)
d = datetime(datetime.today().year, 1, 1)
timezones = []
for tz in pytz.common_timezones:
try:

View File

@ -29,3 +29,4 @@ class UserSettingsTest(test.TestCase):
self.assertContains(res, "Australia/Melbourne (UTC +11:00)")
self.assertContains(res, "Canada/Newfoundland (UTC -03:30)")
self.assertContains(res, "Europe/Moscow (UTC +04:00)")