Andrew MacIntyre found two problems with _strptime.py
while compiled on FreeBSD 4.4 (email can be found at
http://mail.python.org/pipermail/python-dev/2002-November/029873.html).
One bug was when the name of the locale was set to
None an error was thrown when comparing the language
setting when strptime() was passed in a generated re
object. The other problem was a failure where the
improper timezone value was being set because the
locale had the same timezone name for both with and
without daylight savings. I fixed that by just
checking if this case occured; if it did I left the
timezone value as -1 since there is no way to know what
the correct value is.
Now I don't know if either of these fixes are
considered too platform-specific. But I would think
that FreeBSD is a big enough of a platform it might be
warranted. Plus locale settings are inconsistent
enough as it is that dealing with one more funky
possibility won't hurt anything... hopefully.
If patch #633633 (Cleanup for test_strptime.py) is
still open when this patch is closed, just go ahead and
close it without applying the patch. The patch here
includes everything from that patch.
|