Message44153
Logged In: YES
user_id=149084
[kbk@float ~/PYSRC]$ ./python
Python 2.3c2 (#15, Jul 24 2003, 11:17:16)
[GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> from os import environ
>>> victoria = 'AEST-10AEDT-11,M10.5.0,M3.5.0'
>>> environ['TZ'] = victoria
>>> time.tzset()
>>> time.tzname
('AEST', 'AEST')
>>>
=========================================
Hm!! Try a couple of things to try to see what's going on:
=========================================
>>> victoria2 = 'AEST-10AEDT-11'
>>> environ['TZ'] = victoria2
>>> time.tzset()
>>> time.tzname
('AEST', 'AEDT')
>>>
>>> # try reversing the changeover
...
>>> victoria3 = 'AEST-10AEDT-11,M3.5.0,M10.5.0'
>>> environ['TZ'] = victoria3
>>> time.tzset()
>>> time.tzname
('AEST', 'AEDT')
===================================
ok, debug inittimezone:
===================================
Breakpoint 1, inittimezone (m=0x4014053c)
at /home/kbk/PYTHON/python/dist/src/Modules/timemodule.c:608
608t = (time((time_t *)0) / YEAR) * YEAR;
(gdb) n
609p = localtime(&t);
(gdb) p asctime(localtime(&t))
$14 = 0x4013be00 "Wed Jan 1 16:00:00 2003\n"
(gdb) p localtime(&t)->tm_zone
$19 = 0x8162b78 "AEST"
[std time on Jan 1!! ...back up a day or so....]
(gdb) p t = t - 84000
$20 = 1041316800
(gdb) p localtime(&t)->tm_zone
$21 = 0x8162b90 "AEDT"
(gdb) p asctime(localtime(&t))
$22 = 0x4013be00 "Tue Dec 31 17:40:00 2002\n"
(gdb)
===================================
so Linux6.2 thinks AEDT switches to AEST in Jan, and six months
forward is still AEST.
xmas2002 is AEDT so config test passes but timemodule uses Jan 1
and flubs when setting tzname.
Need to do the config test later than xmas.
=====================================
*** Apply Patch SF 762934 configure.in.patch.kbk
======================================
autoreconf && ./configure && make clean && make OPT=-g
======================================
extract from configure log:
....
checking for broken nice()... yes
checking for working tzset()... no
checking for tv_nsec in struct stat... no
checking whether mvwdelch is an expression... yes
....
======================================
[kbk@float ~/PYSRC]$ ./python
Python 2.3c2 (#18, Jul 24 2003, 22:40:09)
[GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from test import test_time
>>> test_time.test_main()
test_asctime (test.test_time.TimeTestCase) ... ok
test_clock (test.test_time.TimeTestCase) ... ok
test_conversions (test.test_time.TimeTestCase) ... ok
test_data_attributes (test.test_time.TimeTestCase) ... ok
test_sleep (test.test_time.TimeTestCase) ... ok
test_strftime (test.test_time.TimeTestCase) ... ok
test_strptime (test.test_time.TimeTestCase) ... ok
test_tzset (test.test_time.TimeTestCase) ... ok
------------------------------------------------------------
Ran 8 tests in 2.523s
OK
>>>
===================================
make test:
===================================
....
....
test_zlib
227 tests OK.
28 tests skipped:
test_aepack test_al test_bsddb185 test_bsddb3 test_cd test_cl
test_curses test_email_codecs test_gl test_imgfile test_largefile
test_linuxaudiodev test_macfs test_macostools test_nis
test_normalization test_ossaudiodev test_pep277 test_plistlib
test_scriptpackages test_socket_ssl test_socketserver
test_sunaudiodev test_timeout test_unicode_file test_urllibnet
test_winreg test_winsound
Those skips are all expected on linux2. |
|
Date |
User |
Action |
Args |
2007-08-23 15:28:02 | admin | link | issue762934 messages |
2007-08-23 15:28:02 | admin | create | |
|