[Zope-dev] ZopeTime Warp

brian.r.brinegar.1 brinegar@purdue.edu
Mon, 8 Jul 2002 16:33:53 -0500 (EST)


Zope Version
   (Zope 2.5.1 (source release, python 2.1, linux2), python 2.1.3, linux2)

Python Version 2.1.3
   (#1, May 15 2002, 15:52:42) [GCC 2.95.4 20011002 (Debian prerelease)

I've got this script which returns strange results:

print context.ZopeTime()
print context.ZopeTime().toZone('US/East-Indiana')

print context.ZopeTime().strftime('%H:%M%p - %m/%d/%Y %Z')
print context.ZopeTime().toZone('US/East-Indiana').strftime('%H:%M%p -
%m/%d/%Y %Z')

return printed

The output from this script is:

2002/07/08 16:24:44.687 US/Eastern
2002/07/08 16:24:44.689 US/East-Indiana
17:24PM - 07/08/2002 EST
16:24PM - 07/08/2002 EST

The output of the 3rd test case is incorrect. It's as if strftime is
changing the time zone. Also the time zone is set to US/East-Indiana in
/etc/timezone, yet the default time zone for Zope Time is US/Eastern.

We do not want our users to have to manually set the time zone with the
toZone method.

Any hints?

Thanks,
-Brian