Artifacts Associated With Ticket 940278ffffffffff
Ticket change [5543a5a91f] (rid 94104) by davidw on 2004-04-22 20:03:29:
- assignee initialized to: "kennykb"
- cmimetype initialized to: "text/plain"
- comment initialized to:
This script: ---- if { ! [info exists env(TZ) ] } { set myTZ "" } else { set myTZ $env(TZ) } puts "Local time is [clock format [clock seconds]]" set env(TZ) GMT+8 puts "Time in Eugene, Oregon is [clock format [clock seconds]]" set env(TZ) GMT-1 puts "Time in Padua, Italy is [clock format [clock seconds]]" if { $myTZ == "" } { unset env(TZ) } else { set env(TZ) $myTZ } ---- does not produce the desired results, in either 8.4.6 or 8.5. kbk found that HAVE_TZSET is not tested for in the configure scripts, except for some crufty unix systems. He also proposed commenting out the calledTzset = 1; on or around line 285. Further bulletins as events warrant. - foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "davidw"
- subsystem initialized to: "06. Time Measurement"
- title initialized to: "env(TZ) has delayed effect on clock format"
- type initialized to: "Bug"
Ticket change [ec51219ac5] (rid 103694) by davidw on 2004-04-23 03:44:02:
- icomment:
Logged In: YES user_id=240 This works on my system (linux, modern kernel, modern glibc): #include <stdio.h> #include <stdlib.h> #include <time.h> int main() { time_t thetime = 0; struct tm *tms; time(&thetime); setenv("TZ", "GMT-1", 1); tms = localtime(&thetime); printf("padova hour %d\n", tms->tm_hour); setenv("TZ", "GMT+8", 1); tms = localtime(&thetime); printf("eugene hour %d\n", tms->tm_hour); } - login: "davidw"
- mimetype: "text/plain"
- username: "davidw"
- icomment:
Ticket change [5c7ce23346] (rid 115306) by davidw on 2004-04-24 04:15:33:
- icomment:
Logged In: YES user_id=240 It seems as if the problem may be that localtime_r does not call tzset, as normal localtime does. Note that there are also some discrepencies between tclUnixThrd.c and tclUnixTime.c. The first globally redefines localtime, whereas the second also checks if HAVE_LOCALTIME_R is defined. This conflict ought to be resolved.
- login: "davidw"
- mimetype: "text/plain"
- username: "davidw"
- icomment:
Ticket change [87e3a37ced] (rid 131777) by kennykb on 2004-05-15 04:44:12:
- closedate changed to: "2004-05-14T21:44:12"
- closer changed to: "kennykb"
- icomment:
Logged In: YES user_id=99768 Put in changes to call tzset whenever $env(TZ) changes.
- login: "kennykb"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "kennykb"