Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 7305ad4d23fe663ab81bf415badf36687e423e27ac9f8715248f65a425b2d7af
Ticket: e580d8372b585aab98deb370bbc9387c86add2f8
[clock scan]: half-hour time zones (IST, NST, CAST, …) are 30 minutes off since 8.6.13
User & Date: serhiy.storchaka on 2026-10-17 10:56:03
Changes

  1. cmimetype changed to: "text/x-fossil-wiki"
  2. comment changed to:
    <nowiki>[clock scan]</nowiki> puts the half-hour zones NFT, NST, NDT, IT, IST, JT, CAST and CADT 30 minutes off:
    
    <verbatim>
    % clock format [clock scan "2026-01-15 12:00 IST"] -format %H:%M -gmt 1
    07:00
    </verbatim>
    
    The expected result is 06:30. For NST (Newfoundland), 12:00 gives 15:00 instead of 15:30.
    
    The TimezoneTable in generic/tclGetDate.y writes these offsets as <tt>HOUR(11/2)</tt>, <tt>HOUR(7/2)</tt> and so on. While the macro was <tt>((int) (60 * x))</tt>, this expanded to <tt>60 * 11/2</tt> = 330. [2bb7cd72c8] (fix for [da6f155ca4], 2022) parenthesized x, so now 11/2 is computed first as an integer division and gives 5.
    
    This is a regression in 8.6.13: 8.6.12 gives the correct times. It is present in 8.6.18, 9.0.5 and 9.1.0.
    
  3. foundin changed to: "8.6.18, 9.0.5, 9.1.0"
  4. login: "serhiy.storchaka"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. severity changed to: "Minor"
  8. status changed to: "Open"
  9. subsystem changed to: "06. Time Measurement"
  10. title changed to:
    `clock scan`: half-hour time zones (IST, NST, CAST, …) are 30 minutes off since 8.6.13
    
  11. type changed to: "Bug"