Overview
| Artifact ID: | 9122a23a28d586f87385e15fe47d36f3f2f3a04e4e1383268acf1b0fd7343979 |
|---|---|
| Ticket: | 51aa53616067cb63900b17ca1d71f07b094ffa1a
clock timezone tests fail when ran against system tzdata |
| User & Date: | sebres on 2026-03-04 17:36:14 |
Changes
- icomment:
OK, I can confirm that a lot of tests failed if there is no "tzdata in the library (as we have /usr/share/zoneinfo)". Besides mentioned issues, there are several others...<br/> Many of them are simply fixed by removal of colon before the TZ-name.<br/> Another can be fixed by adding a constraint that checking whether tcl's tzdata is available, but... But I see failures on all tests covering daylight switch, timestamps around DST-hole, etc. And such failures are generally not OK in my opinion. For instance: <code><pre style="margin-left:15pt"> ==== clock-34.69.2.vm:1 relative time, daylight switch FAILED ==== Contents of test case:<br/> set base [clock scan "03/27/2016" -timezone CET] set res {} lappend res [clock format [clock scan "+1 hour" -base $base -timezone CET] -timezone CET -format {%Y-%m-%d %H:%M:%S %Z}] lappend res [clock format [clock scan "+2 hour" -base $base -timezone CET] -timezone CET -format {%Y-%m-%d %H:%M:%S %Z}] <br/>---- Result was: {2016-03-27 01:00:00 +0100} {2016-03-27 02:00:00 +0100} ---- Result should have been (exact matching): {2016-03-27 01:00:00 CET} {2016-03-27 03:00:00 CEST} ==== clock-34.69.2.vm:1 FAILED </pre></code> I understand that it uses numeric TZ by representing its name (e. g. +0100 instead of CET), but <b>the 2nd timestamp is completely wrong</b>...<br/> Because "2016-03-27 <b style="color:red">02:00:00 +0100</b>" doesn't exist <b>in CET</b> (it is in the DST-hole) and basically it shall be "2016-03-27 <b style="color:green">03:00:00 +0200</b>" (since it shall switch to CEST). So either some aliasing is wrong in zones of "/usr/share/zoneinfo" (e. g. CET is really an alias to +0100, without DST-switches etc).<br/> Or we have something fundamentally wrong in handling of system timezones. Thus the issue grows and grows.<br/> At the moment, I can only say that usage of Tcl without its tzdata is not advisable. - login: "sebres"
- mimetype: "text/x-fossil-wiki"