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.


Zope-Dev maillist  -
**  No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to