[Remind-Fans] timezone handling

Dianne Skoll dianne at skoll.ca
Mon Mar 6 13:43:21 EST 2023


On Mon, 6 Mar 2023 13:31:50 -0500
Retourné du Japon via Remind-fans <remind-fans at lists.skoll.ca> wrote:

> For instance, this year, the US starts their Daylight saving time on
> March 12, but, if I am not mistaken, Europe will start it on March 26.

I let Remind (or more precisely, my C library) do the heavy lifting.

REM Sun November SATISFY [isdst($T) != isdst($T+1)] MSG Daylight Saving Time Ends
REM Sun March SATISFY [isdst($T) != isdst($T+1)] MSG Daylight Saving Time Starts

That should work for anywhere in the Northern hemisphere where the
time changes in November and March.  Use "April" rather than "March"
for the second line if your time changes in April.  You could in fact
leave out the month in both REM statements (just REM SATISFY ...)
but that would be a bit less efficient.

> 2. Is there a way  of updating an offset automatically, based on this
> difference?

In recent versions of Remind, you might be able to whip something
up using the built-in tzconvert() function.  This too falls back on
your C library to do the heavy lifting.

Regards,

Dianne.



More information about the Remind-fans mailing list