[windev] Calculating DST switch moments of many future years
Goran Pusic
goran_pusic at yahoo.com
Thu Mar 26 09:28:43 GMT 2009
Hi all!
I need to calculate UTC moment for DST switches for a given time zone (perhaps different from system's time zone), for a couple of decades in advance. (If it sounds like a WTF: this info is sent to an embedded system to help it know about it's timezone bias at every moment in time, for as long as it will live, so that it can calculate local time).
For that, I have a calculation that relies on Windows TIME_ZONE_INFORMATION and friends. However, recently (after some 5-6 years after the code was written), people found out there are bugs inside my calculation :-( .
Now... Before I delve into this again (it's not urgent, it's for next autumn ;-) ), do you guys have any pointers on how to do it? Did anyone do it before?
HTH,
Goran.
P.S.
Yes, I know that DST rules change, so calculation may be good now, but bad in the future. Nothing I can do about that, it's on shoulders of users.
P.P.S Hi, Serge W! Remember this? (Bug is mine, though)
More information about the Windev
mailing list