[Patches] [ python-Patches-639112 ] _strptime fixes for None locale and tz

noreply@sourceforge.net noreply@sourceforge.net
Wed, 27 Nov 2002 00:31:08 -0800


Patches item #639112, was opened at 2002-11-15 22:20
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=639112&group_id=5470

Category: Library (Lib)
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Brett Cannon (bcannon)
Assigned to: Nobody/Anonymous (nobody)
Summary: _strptime fixes for None locale and tz

Initial Comment:
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.

----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2002-11-27 09:31

Message:
Logged In: YES 
user_id=21627

Thanks for the patch. Applied as

_strptime.py 1.6
test_strptime.py 1.7


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=639112&group_id=5470