Issue 706707: time.tzset standards compliance update (original) (raw)

Created on 2003-03-20 04:57 by zenzen, last changed 2022-04-10 16:07 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
tzset2.diff zenzen,2003-03-20 05:01 diff -c patch to configure.in and test_time.py
tzset3.diff zenzen,2003-03-27 20:23 diff -c patch to configure.in and test_time.py
Messages (12)
msg43057 - (view) Author: Stuart Bishop (zenzen) Date: 2003-03-20 04:57
Update to configure.in and test_time.py to only use TZ environment variable format documented at http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap08.html
msg43058 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2003-03-20 21:50
Logged In: YES user_id=31435 Assigned to Guido, as I can't test it. Two notes: 1. Leaving commented-out code in config and the test suite doesn't appear to serve a purpose, although it will serve to confuse future readers ("why is this here? why is it commented out?"). 2. The Python style guide asks for a blank after commas in argument lists and tuples. We're not really in danger of stretching the screen here .
msg43059 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2003-03-21 01:11
Logged In: YES user_id=6380 Unassigning, as I won't hve time for this. But it is important - someone else should make sure this goes into 2.3b1!
msg43060 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-03-21 01:18
Logged In: YES user_id=33168 I'll try to get to this soon.
msg43061 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-03-21 21:28
Logged In: YES user_id=33168 After patching, the test fails: File "/home/neal/build/python/2_3/Lib/test/test_time.py", line 115, in test_tzset self.failUnlessEqual(time.daylight,1) File "/home/neal/build/python/2.3/Lib/unittest.py", line 292, in failUnlessEqual raise self.failureException, \ AssertionError: 0 != 1 Also, why is the code commented out (via a string) on lines 120-144? Should these be removed? I see the comment about wallclock time, but don't understand why the code should be left in if we can't test it. I can understand a comment describing generally the issue.
msg43062 - (view) Author: Stuart Bishop (zenzen) Date: 2003-03-27 20:12
Logged In: YES user_id=46639 tzset3.diff is an updated diff against the CVS head. Fixes: -Don't test time.altzone for UTC - non-DST means altzone is undefined -Make sure dst timezone name is not the same as non-dst timezone name in TZ environment variable, to work around an apparent Solaris bug. -Extraneous cruft removed from test_time.py and configure.in - no more irrelevant comments. -More whitespace as per Tim's comments comments.
msg43063 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-03-29 21:46
Logged In: YES user_id=33168 In the last chunk added, there is a bare except when calling time.tzset(). What are the possible exceptions? I don't want to have a bare except since this can mask a real error. The patch still fails for me on Linux (Redhat): * line 107: self.failUnless(time.tzname[1] == 'AEDT') - tzname has: ('AEST', 'AEST') * line 109: self.failUnlessEqual(time.daylight, 1) * line 111: self.failUnlessEqual(time.altzone, -39600) Haven't tried on other Unixes.
msg43064 - (view) Author: Stuart Bishop (zenzen) Date: 2003-04-07 02:19
Logged In: YES user_id=46639 The bare except can go (just 'time.tzset()' without the try..except around it). The failure under Redhat is wierd - I can confirm that it works on a Redhat 7.2 box (as well as under OS X 10.2 and Solaris 2.8). The Australian timezone checks are testing that the timezone initialization stuff works in the southern hemisphere, and that time.altzone is being reset by tzset(). This will probably need to be taken to Python-dev unless you feel like applying the patch to HEAD and seeing who screams.
msg43065 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-04-11 02:33
Logged In: YES user_id=33168 Stuart, I saw the mails on py-dev, but am not sure about any conclusions. I tested the patch on Solaris 8 and Redhat 7.2. Solaris works (fails before the patch). Redhat fails with the patch, but I think it worked before the patch. I can check in to test on other architectures and back out if necessary. Let me know how to proceed. Thanks.
msg43066 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2003-04-11 15:38
Logged In: YES user_id=6380 Neal, I think you can check it in now.
msg43067 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-04-11 15:52
Logged In: YES user_id=33168 Checked in as: configure: 1.390 configure.in: 1.401 Lib/test/test_time.py: 1.14
msg43068 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-05-21 22:12
Logged In: YES user_id=33168 Stuart, could you take a look at bug 728051? There is a time zone problem. I thought there were some other time zone problems on the snake-farm, but I don't see them now. Thanks.
History
Date User Action Args
2022-04-10 16:07:48 admin set github: 38189
2003-03-20 04:57:47 zenzen create