REXX DATE() Fixed Offset or External OS date for Regional Time Zone Conversion
0 reputation · 10 Mar 2023, 04:57 UTC
A REXX script must present the same instant in a regional time zone chosen at runtime, not merely the interpreter host's local time.
Classic REXX, Object REXX, Open Object REXX, and Regina expose DATE() and TIME() bound to the operating system's configured zone and DST rules. DATE('S') supports fixed-offset arithmetic from the REXX base date, but carries no time-zone metadata and cannot model daylight-saving transitions or historical zone changes. Calling an external Unix date or Windows PowerShell command can perform conversion, but output parsing depends on OS version and locale.
Behavior must be confirmed against the specific interpreter and host OS because DATE() is host-dependent and not defined by the REXX language specification.
Which approach preserves correctness across daylight-saving boundaries while remaining maintainable across REXX implementations? Is there a documented REXX extension that accepts IANA or Windows time-zone identifiers without external process execution?