[Zope-CMF] CachingPolicyManager tests

Dieter Maurer dieter@handshake.de
Wed, 20 Nov 2002 19:58:47 +0100


Yuppie writes:
 > This problem normally just appears east of the Atlantic Ocean:
and only on Windows...
 > 399, in safelocaltime
 >      rval = localtime(t_int)
 > IOError: [Errno 22] Invalid argument
 > 
 > 
 > Due to a bug in the DateTime module (see 
 > <http://collector.zope.org/Zope/484> ), some CachingPolicyManager tests 
 > fail if your machine's timezone is GMT+X (X > 0). I don't think this bug 
 > will be fixed soon.
This is a bug in the Windows "C" library function "localtime"
which is unable to handle negative parameters.

You may change the code in "safelocaltime:399" to
"rval= localtime(max(0,t_int))".

 > My question:
 > I don't understand what the CachingPolicyTests actually do. Is
 > <code>
 >          self._epoch = DateTime( '1970/01/01' )
 > </code>
 > necessary or could it also be an other date?
I do not know.


Dieter