Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 6a5701e87590c0f7db9c74f8d4109a708689cfd1
Ticket: 574573ffffffffffffffffffffffffffffffffff
clock format gets wrong timezone, once
User & Date: techentin on 2002-06-27 13:24:34
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Tcl Versions 8.3.4 and 8.4a4.
    Platform DEC Alpha OSF1 v4.0
    DEC C V5.8-009 on Digital UNIX V4.0
    
    ==== clock-3.2 clock format tests FAILED
    ==== Contents of test case:
    
        # TCL_USE_TIMEZONE_VAR
    
        catch {set oldtz $env(TZ)}
        set env(TZ) PST
        set x {}
        append x [clock format 863800000 -format %Z -gmt 1]
        append x [set env(TZ)]
        catch {unset env(TZ); set env(TZ) $oldtz}
        set x
    
    ---- Result was:
    CSTPST
    ---- Result should have been:
    GMTPST
    ==== clock-3.2 FAILED
    
    On closer inspection, it appears that [clock format] 
    returns the wrong timezone only one time after changing 
    the env(TZ) variable.  Subsequent calls to [clock format] 
    return the proper timezone.  for example:
    
    ./tclsh
    % set env(TZ)
    % clock format 863800000 -format %Z -gmt 1
    GMT
    % set env(TZ) PST
    PST
    % clock format 863800000 -format %Z -gmt 1
    CST
    % clock format 863800000 -format %Z -gmt 1
    GMT
    % clock format 863800000 -format %Z -gmt 1
    GMT
    % 
    
    
    It doesn't seem to matter if env(TZ) is set prior to 
    entering tclsh.  This problem also does not appear on 
    HP-UX or Win32.  Maybe it is a 64 bit thing.
    
    
  4. foundin changed to: "obsolete: 8.4a4"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "techentin"
  9. subsystem changed to: "16. Commands A-H"
  10. title changed to: "clock format gets wrong timezone, once"
  11. type changed to: "Bug"