Tristan Seligmann wrote:
> Unfortunately, it would appear that the Olson tz database contains some
> rather... uh... confusing data. For example:
>
>>>> pytz.timezone('Africa/Johannesburg')
> <DstTzInfo 'Africa/Johannesburg' SAST+1:30:00 STD>
> # SAST is UTC+2 not UTC+1.5
The tz of Africa/Johannesburg initially started with an offset of 1h30
before 1903. It looks like a bug in pytz
>>> dt = datetime(2007, 3, 11, 0, 0, 0)
>>> aj = pytz.timezone("Africa/Johannesburg")
>>> aj.utcoffset(dt)
datetime.timedelta(0, 5400)
should be 7200 seconds in 2007
>>>> pytz.timezone('Etc/GMT+2')._utcoffset
> datetime.timedelta(-1, 79200)
That's another bug. Side note: You shouldn't access the _utcoffset
attribute. The offset may depend on the date.
I notified Stuart about the two issues in his package.
Christian
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com