Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 454eebb1bd274cc2e36eb154f5a4e6848bfccf191462c008fa891e13c56b3ccd
Ticket: dc69e5ecf04313429fd202b1906cd85bb7888f95
[clock scan] does not recognize AKST or AKDT
User & Date: sebres on 2018-05-25 11:09:50
Changes

  1. icomment:
    By working on the PoC for test-solution over all zones-coverage I found many another missing zones, e. g. for Anchorage:
    
    <code><pre>
    % set d [clock format [set c [clock add 10000000 6 months]] -timezone :America/Anchorage]
    Mon Oct 26 07:46:40 AHST 1970
    % expr {$c == [clock scan $d]}
    1
    % set d [clock format [set c [clock add 10000000 0 months]] -timezone :America/Anchorage]
    Sun Apr 26 08:46:40 AHDT 1970
    % expr {$c == [clock scan $d]}
    unable to convert date-time string "Sun Apr 26 08:46:40 AHDT 1970": syntax error (characters 20-23)
    </pre></code>
    The reason is simply: the zone America/Anchorage has different shortcuts for different times: LMT, AST, AWT, APT, AHST, AHDT, AKST, AKDT
    
    So the right solution would be to make an aliasing rules (map with legacy TZ -> real TZ), and some simply script that builds this map from library/tzdata/*.
    
    As regards the ambiguity regarding ambiguous duplicates: for example it could get a time range to take it into account by searching of the proper real zone.
    
    I'll do soon the back-porting of my tclclockmod to the tcl-core and later try to provide a ultimate solution round about legacy zones.
    
  2. login: "sebres"
  3. mimetype: "text/x-fossil-wiki"