brosner/django-timezones — Issue #17: ValueError: tzinfo.dst() returned 1440; must be in -1439 .. 1439
Author: qnub
Created: 2011-12-31 11:13:42+00:00
State: open

This error appear on runserver models validate. When model import PRETTY_TIMEZONE_CHOICES. Error raise in 13 line of zones.py file.

I try to dry run code from zones.py in python console:

```python
from datetime import datetime
import pytz
for tz in pytz.common_timezones:
now = datetime.now(pytz.timezone(tz))
ofs = now.strftime("%z")
print((int(ofs), tz, "(GMT%s) %s" % (ofs, tz)))
```

And have output:

```

(0, 'GMT', '(GMT+0000) GMT')
(300, 'Indian/Antananarivo', '(GMT+0300) Indian/Antananarivo')
(600, 'Indian/Chagos', '(GMT+0600) Indian/Chagos')
(700, 'Indian/Christmas', '(GMT+0700) Indian/Christmas')
(630, 'Indian/Cocos', '(GMT+0630) Indian/Cocos')
(300, 'Indian/Comoro', '(GMT+0300) Indian/Comoro')
(500, 'Indian/Kerguelen', '(GMT+0500) Indian/Kerguelen')
(400, 'Indian/Mahe', '(GMT+0400) Indian/Mahe')
(500, 'Indian/Maldives', '(GMT+0500) Indian/Maldives')
(400, 'Indian/Mauritius', '(GMT+0400) Indian/Mauritius')
(300, 'Indian/Mayotte', '(GMT+0300) Indian/Mayotte')
(400, 'Indian/Reunion', '(GMT+0400) Indian/Reunion')
Traceback (most recent call last):
File "", line 3, in
ValueError: tzinfo.dst() returned 1440; must be in -1439 .. 1439
```

Python 2.7.2+ on Ubuntu 11.10 x64