Hi,
in the last week of October, when switching back from daylight saving time to normal time, the hour between 2am and 3am exists twice, with different offsets. Here Mathematica mixes up:
stmptbl = {DateObject[{2022, 10, 29, 23, 30, 0}, TimeZone -> 0],
DateObject[{2022, 10, 30, 0, 30, 0}, TimeZone -> 0],
DateObject[{2022, 10, 30, 1, 30, 0}, TimeZone -> 0],
DateObject[{2022, 10, 30, 2, 30, 0}, TimeZone -> 0]}
stmptbl2 = TimeZoneConvert[#, "Europe/Berlin"] & /@ stmptbl
The third entry in the result
{Sun 30 Oct 2022 01:30:00CEST,
Sun 30 Oct 2022 02:30:00CEST,
Sun 30 Oct 2022 02:30:00CEST,
Sun 30 Oct 2022 03:30:00CET}
is wrong: this is no longer daylight saving time, but standard time (“winter time”). For the reverse conversion
TimeZoneConvert[#, 0] & /@ stmptbl2
you obtain:
{Sat 29 Oct 2022 23:30:00GMT,
Sun 30 Oct 2022 01:30:00GMT,
Sun 30 Oct 2022 01:30:00GMT,
Sun 30 Oct 2022 02:30:00GMT}
Here the second entry is wrong and deviates by one hour.
I assume this is a bug (or rather: two bugs). Can anyone suggest a workaround?
Yours,
Bernd.