Tcl Source Code

View Ticket
Login
Ticket UUID: 2c237beffbace823e27c6abe6a330e8fddbd1ca4
Title: [clock] regression in tzdata (TZ generation in tclZIC seems not support new iana database format, e. g. %z instead of offset TZ-name)
Type: Bug Created on: 2024-10-29 17:58:28
Submitter: sebres Assigned to: nobody
Subsystem: 16. Commands A-H Severity: Critical
Priority: 9 Immediate Last modified: 2026-03-04 00:45:10
Status: Closed Closed by: sebres
Resolution: Fixed Closed on: 2026-03-04 00:45:10
Version: 8.6.15, 8.7+
Description:

[9275edd424971958] introduced a regression: several TZs got wrong time zone names (%z instead of TZ-offset name).

The reason looks like "tools/tclZIC.tcl" didn't support the change on the format for IANA time zone database 2024b.

I'm preparing a branch bug-fix-tz-w-offs fixing tools/tclZIC.tcl and few other small bugs around it found by tests and attempt to fix github/tclclockmod#24. The branch is initiated as 8.5-based branch to avoid the regression in 8.5 by regeneration of tzdata with tools/tclZIC there.

This was also released with 8.6.15 and 9.0, so I guess it must be rereleased soon or a quick patch must be provided for maintainers.

User Comments:
sebres added on 2024-10-29 18:45:02:

Fixed in all branches now, thus close it.

For the patch of 8.6.15 see [6a166839ed62c9c1], 9.0 - [ab6663673f92f81f].


sebres added on 2026-03-03 23:20:47:

I'll reopen this, since the fix of tclZIC-tool has an issue for replacement of TZ with minutes.

For instance, TZ "America/Paramaribo" has an offset -12600, which shall result to the name "-0330" instead of "-0430" (like it does now).

PoC:

# Math:
# 3*60*60+30*60 == 12600
# 4*60*60+30*60 == 16200

# Tcl-Clock: % clock format 0 -timezone America/Paramaribo -format "%H:%M %Z" 20:30 -0430 % clock format 0 -timezone -0330 -format "%H:%M %Z" 20:30 -0330 % clock format 0 -timezone -0430 -format "%H:%M %Z" 19:30 -0430

(still worse - it'd be wrong by the conversion back, because clock scan would consider %Z incorrectly)

I'll provide the fix together with updated tzdata.


sebres added on 2026-03-04 00:45:10:

The continuation issue resolved in [72997d924deaff7d] ... [163bdb1a4bdf56a3], ticket closed.