On Tue, 2022-06-28 at 16:12 +0000, Eliot Kimber wrote:
So my question: does anyone have a technique for determining if a given time zone or region is using DST?
Is currently using? The transition dates are in at least some cases political, and set by parliaments or whatever each year.
My server is running on Linux but is developed and tested on macOS.
You could run the system command, e.g. LC_TIME="fc_CA.UTF-8" date which here returns mar 28 jun 2022 17:38:41 EDT
but that depends on having the locale installed and up to date.
We also don't have in XQuery or XSLT or Xpath a way to interpret "The thurd sunday in March" which is when, for example, Cuba switches.
I'm not sure if tehre's a machine-readable definitive list somewhere but seems possible...