

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
1 message in org.python.python-bugs-list[ python-Bugs-897817 ] test_strptime ...| From | Sent On | Attachments |
|---|---|---|
| SourceForge.net | Mar 7, 2004 6:26 pm |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | [ python-Bugs-897817 ] test_strptime failures on FC2-test | Actions... |
|---|---|---|
| From: | SourceForge.net (nore...@sourceforge.net) | |
| Date: | Mar 7, 2004 6:26:42 pm | |
| List: | org.python.python-bugs-list | |
Bugs item #897817, was opened at 2004-02-15 21:52 Message generated for change (Comment added) made by bcannon You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=897817&group_id=5470
Category: Python Library Group: Python 2.4
Status: Closed Resolution: Fixed
Priority: 5 Submitted By: Anthony Baxter (anthonybaxter) Assigned to: Anthony Baxter (anthonybaxter) Summary: test_strptime failures on FC2-test
Initial Comment: I'm seeing test_strptime failures on this box, running a version of Fedora Core that's between 1 and the new test release.
test test_strptime failed -- Traceback (most recent call last): File "Lib/test/test_strptime.py", line 258, in test_timezone self.failUnlessEqual(strp_output.tm_isdst, 0) AssertionError: -1 != 0
Note that the following line (which tests GMT) also fails with a -1.
The underlying failure:
import _strptime strp_output = _strptime.strptime("UTC", "%Z") strp_output.tm_isdst -1 strp_output = _strptime.strptime("GMT", "%Z") strp_output.tm_isdst
-1
----------------------------------------------------------------------
Comment By: Brett Cannon (bcannon)
Date: 2004-03-07 15:26
Message: Logged In: YES user_id=357491
Fixed in rev. 1.31 . Basically tweaked the test that checks if time.tzname[0] == time.tzname[1] (which is bad since then you can't tell when DST is in effect or not) to take into acct. if time.tzname[1] (the DST timezone) is set to UTC or GMT. Since there is no adjustment, then just set let be set to 0 through the normal algorithm.
----------------------------------------------------------------------
Comment By: Brett Cannon (bcannon) Date: 2004-02-23 20:26
Message: Logged In: YES user_id=357491
A possible cause for this, Anthony, is having the timezone set to ("UTC", "GMT") and time.daylight to a 1. This would lead to not passing the test since there is an explicit test in the strptime code for when duplicate non-DST and DST timezones are the same and this would do it since UTC and GMT are injected into the non-DST timezone list for comparisons. The default is -1 since you can't tell the proper value if both non-DST and DST are the same. And UTC and GMT should not be considered DST timezones obviously.
Anyway, I hope you don't find anything wrong and it was just a weird glitch in the date settings.
----------------------------------------------------------------------
Comment By: Anthony Baxter (anthonybaxter) Date: 2004-02-23 19:05
Message: Logged In: YES user_id=29957
Very very strange. I rebuilt python, and the problem has gone away. I will assign this to myself and try and reproduce it.
----------------------------------------------------------------------
Comment By: Brett Cannon (bcannon) Date: 2004-02-17 13:39
Message: Logged In: YES user_id=357491
Anthony, can you let me know what the following commands spit out?::
import time; import _strptime time.tzname time.daylight _strptime.LocaleTime().timezone _strptime.TimeRE()['Z']
That should be enough info for me to debug this.
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=897817&group_id=5470







