Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 0da5a4403904e27914b6ede796bcb3e6d2029fb7f697e0d119c427b87cccebad
Ticket: 51aa53616067cb63900b17ca1d71f07b094ffa1a
clock timezone tests fail when ran against system tzdata
User & Date: rossburton on 2026-02-27 17:34:56
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-markdown"
  4. comment changed to:
    I'm in a cross-compiled environment so running the tcl test suite outside of the build tree on the target to verify that tcl is working and integrated correctly.
    
    I build tcltest and install that and the tests/ directory.  Most tests work:
    
    ```
    $ ./tcltest tests/dict.test
    dict.test:	Total	373	Passed	371	Skipped	2	Failed	0
    Number of tests skipped for each constraint:
    	2	memory
    ```
    
    However, if I run the clock tests with a tcl that didn't install the tzdata package in the library as we have /usr/share/zoneinfo:
    
    ```
    $ ./tcltest tests/clock.test
      Validity default mode: on
    
    
    ==== clock-59.2.vm:1 correct time zone names, format and scan back, bug and regression [2c237beffbace823] FAILED
    ==== Contents of test case:
    
        set result {}
        foreach {base tz} {
    	 1700000000 "Etc/GMT-2"
    	 1700000000 "Etc/GMT+2"
    	 1301184000 "Europe/Kaliningrad"
    	  152632800 "Pacific/Chatham"
    	 -765317964 "America/Paramaribo"
    	-2337928528 "Australia/Eucla"
        } {
    	set v [clock format $base -timezone Etc/GMT-2 -format "%Y-%m-%d %H:%M:%S %Z"]
    	lappend result [expr {[set t [clock scan $v -format "%Y-%m-%d %H:%M:%S %Z"]] == $base ? 1 : "0 ($t != $base for $v)"}]
    	lappend result [expr {[set t [clock scan $v]] == $base ? 1 : "0 ($t != $base for $v)"}]
        }
        set result
    
    ---- Result was:
    1 {0 (1700007080 != 1700000000 for 2023-11-15 00:13:20 +02)} 1 {0 (1700007080 != 1700000000 for 2023-11-15 00:13:20 +02)} 1 {0 (1301191080 != 1301184000 for 2011-03-27 02:00:00 +02)} 1 {0 (152639880 != 152632800 for 1974-11-02 16:00:00 +02)} 1 {0 (-765310884 != -765317964 for 1945-10-01 05:40:36 +02)} 1 {0 (-2337921448 != -2337928528 for 1895-11-30 17:24:32 +02)}
    ---- Result should have been (exact matching):
    1 1 1 1 1 1 1 1 1 1 1 1
    ==== clock-59.2.vm:1 FAILED
    ```
    
    Note that the in-tree tests work as they set TCL_LIBRARY to point at the source tree, which includes tzdata.
    
    It's entirely possible that I'm doing something wrong/dumb, but it's also possible that the tzdata loading has broke, or the copy of tzdata in tcl doesn't match the "real" tzdata 2025c that I have installed.
    
  5. is_private changed to: "0"
  6. login: "rossburton"
  7. priority changed to: "5 Medium"
  8. private_contact changed to: "996cc25f404016303f46d284bf704c17d8b7bc5f"
  9. resolution changed to: "None"
  10. severity changed to: "Minor"
  11. status changed to: "Open"
  12. submitter changed to: "rossburton"
  13. subsystem changed to: "34. tcltest Package"
  14. title changed to:
    clock timezone tests fail when ran against system tzdata
    
  15. type changed to: "Bug"