Alexander Limi wrote:
> > Philipp von Weitershausen wrote:
> >> I've recently been seeing weird DateTime test failures on all Zope 2
> >> branches since 2.7 (see below). Any idea what I'm doing wrong? My system
> >> is OSX 10.3 with a self-compiled Python 2.4.1 (through darwinports). My
> >> system timezone, as you can see, is GMT+0800 (Beijing time).
> >
> > I've figured this one out. The Chinese time zone is known as 'CST', but
> > so is 'US/Central' as well. In fact, Mac OS X itself doesn't report the
> > time zones to python consistently. When I set my time zone to Chicago
> > time, time.tzname is ('CST', 'CST') and when I set my time zone to
> > Shanghai time, it remains the same, even though it's a completely
> > different time zone. DateTime.DateTimeZone._zmap can only pick one
> > timezone to be mapped to the 'CST' name and it happens to choose
> > 'US/Central' (which doesn't surprise me obviously). Running the tests
> > with the operating system's time zone set to, say, CET works fine.
> Welcome to the wonderful US-centric world of the Zope DateTime module. I
> believe the same problem exists for Australian time zones which happen to
> share abbreviations with some obscure US time zone. ;)

Indeed. In fact, I think CST is one of those ;). pytz fortunately avoids these 
by not knowing about these names. It only knows CST6CDT which seems to be the 
U.S. version
of the time zone.


This message was sent using IMP, the Internet Messaging Program.
Zope-Dev maillist  -
**  No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to