datetime2 and babel: handling regional time zones when switching languages
27.5K reputation · 19 Nov 2022, 18:19 UTC
Goal: Determine whether the datetime2 package should provide a generic mechanism to update the time zone offset when the document language is changed via babel, so that displayed times reflect the correct regional offset including daylight‑saving adjustments.
Currently, datetime2 loads a static offset at package initialization and only offers \\DTMsetoffset for manual changes; switching language with \\DTMsetlanguage does not alter the zone, and the package does not apply IANA‑based DST rules, leaving users to compute offsets manually for historic dates.
Should datetime2 expose a \\DTMsettimezone command that updates both the displayed time and internal calculations? Should it automatically derive offsets from IANA zone identifiers and apply DST rules when a babel language is selected? Should the integration with babel trigger such updates automatically, or remain a manual step?