Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 2a946fc78197000904dd544da144ae806b6a6e2cf864b01525f83a73d58c7687
Ticket: 51aa53616067cb63900b17ca1d71f07b094ffa1a
clock timezone tests fail when ran against system tzdata
User & Date: sebres on 2026-03-02 13:14:16
Changes

  1. icomment:
    Short analyze shows that there are basically 2 issues:
    
    1. the format of TZ without Tcl's tzdata uses +02 instead of +0200 for %Z token, so the value of v contains:
    <code><pre style="padding-left:15pt">
    <b style="color:red;">2023-11-15 00:13:20 +02</b>    <i style="color:#777;"># - no tzdata</i>
    <b style="color:green;">2023-11-15 00:13:20 +0200</b>  <i style="color:#777;"># - with tzdata</i>
    </pre></code>
    what would be not a large problem, if we didn't have another issue, namely:
    
    2. the free scan consider +02 in opposite to formatted scan as +2 minutes "zone", so for the free scan it is the same than +0002 and not +0200:
    <code><pre style="padding-left:15pt">
    % puts [clock format [clock scan "2023-11-15 00:13:20 +02" -format "%Y-%m-%d %H:%M:%S %Z"] -gmt 1]
    Tue Nov 14 22:13:20 GMT 2023
    % puts [clock format [clock scan "2023-11-15 00:13:20 +02"] -gmt 1]
    Wed Nov 15 00:11:20 GMT 2023
    % puts [clock format [clock scan "2023-11-15 00:13:20 +0002"] -gmt 1]
    Wed Nov 15 00:11:20 GMT 2023
    % puts [clock format [clock scan "2023-11-15 00:13:20 +0200"] -gmt 1]
    Tue Nov 14 22:13:20 GMT 2023
    </pre></code>
    what, regardless the issue 1, is definitely a bug in my opinion.
    
  2. login: "sebres"
  3. mimetype: "text/x-fossil-wiki"