Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: d0b7dbcc269b333b3ee02c1b78d88b05511a4e618d0df02c276b67902239dc66
Ticket: e580d8372b585aab98deb370bbc9387c86add2f8
[clock scan]: half-hour time zones (IST, NST, CAST, …) are 30 minutes off since 8.6.13
User & Date: jan.nijtmans on 2026-10-20 16:15:11
Changes

  1. assignee changed to: "jan.nijtmans"
  2. closedate changed to: "2461334.1772140856"
  3. closer changed to: "jan.nijtmans"
  4. 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.
    
  5. icomment:
    Fixed in [6a5a4260ee|trunk], core-9-0-branch and core-8-6-branch
    
    Many thanks!
    
  6. login: "jan.nijtmans"
  7. mimetype: "text/x-fossil-wiki"
  8. resolution changed to: "Fixed"
  9. status changed to: "Closed"