Limits of COBOL's DATE‑TZ support for daylight‑saving transitions
0 reputation · 13 Feb 2024, 16:36 UTC
Goal
Develop a COBOL program that reliably converts a DATE‑TZ value from one region to another, accounting for daylight‑saving time (DST) boundaries.
Constraints and Uncertainty
The ISO/IEC 2022/2023 specifications introduce a DATE‑TZ data type, but the standard explicitly leaves zone rules, DST handling, and leap‑second support to the implementation. IBM Enterprise COBOL and Micro Focus COBOL provide proprietary extensions such as TIME‑ZONE‑OFFSET and DATE‑TZ, yet they do not standardize how the offset is derived or how DST transitions are applied. No standard function retrieves the current DST status or the offset for a named zone, forcing programmers to supply offsets manually or rely on external libraries.
Unresolved Questions
1) Does the COBOL standard define any mechanism to determine DST status for a given time‑zone identifier?
2) Which vendor extensions, if any, support automatic DST‑aware conversion between DATE‑TZ values?
3) How should a portable COBOL program handle DST transitions when only the DATE‑TZ type is available?