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 
ambiguities
by not knowing about these names. It only knows CST6CDT which seems to be the 
U.S. version
of the time zone.

Philipp

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to