provide a version of datetime which supports iana time zones
It would be useful to provide a version of %datetime where an iana time zone could be passed instead of a numeric offset from GMT to return date and time.
I have a requirement to determine the date and time in another timezone. This includes timezones in MST (Arizona/Phoenix) which does not observe DST.
If I am in Arizona/phoenix, %timezone will always return DST flag as false even when it applies in other parts of the US. So if I need to convert the system time in MST to say EST, I can't work out what offset to add as I don't know if EST is in DST or not.
If it is the other way round, ie, I am in EST and need to work out what the date and time is in MST then I can determine if EST is in DST and adjust the offset.
However, this does not work if I am not in the US, as US DST has different start and end dates than UK and I assume rest of the world.
All of this could be solved if I could just call %datetime and pass the iana timezone name I need
Thanks for the detailed example. You’re right that numeric GMT offsets and a local DST flag aren’t sufficient for reliable cross-timezone conversion, especially when DST rules differ by region.
For now, the feasible workaround we’ve provided is to shell out to the OS datetime functionality and request the target time zone there; it uses the system’s time zone rules (including IANA zones like America/Phoenix) and should produce the correct result.
We are considering IANA time zone support in a future release, but we don’t view this as urgent enough to commit to a schedule yet.
2/11/2026, 12:42 AM 0
The routines would then apply these offsets to my local date and time each time I need to calculate a store's time stamp.
This is necessary as I could be processing thousands of transactions for thousands of stores each in different timezones, so I can't just pick up a time stamp at the start of the program for a single store
Its doable, but ugly.
Much nicer to just say xcall time (auditTime,'America/New_york'), and same for date
So hopefully support for IANA time zones will make it into the language sooner rather than later.
2/11/2026, 1:53 PM 0