[Zope-Coders] DateTime with negative dates (Collector #484)
Lennart Regebro
lennart@regebro.nu
Fri, 17 Jan 2003 12:46:56 +0100
If you create a DateTime object that is before 1970/01/01 00:00 on windows,
you get an error message:
File "DateTime.py", line 405, in safelocaltime
rval = localtime(t_int)
IOError: [Errno 22] Invalid argument
This is because windows localtime() can't handle dates before 1970/01/01.
There is a couple of ways of handling this:
1. Either make some special magick windows code to handle negative dates (I
don't even know if it's possible).
2. Refuse to use negative dates.
3. Refuse to use negative dates on Windows, but allow them on unix.
4. ????
Input appriciated.