On Fri, Mar 25, 2016 at 9:23 AM, Bert Freudenberg <bert@freudenbergs.de> wrote:Well, it’s okay to cheat as long as you won’t get caught (says DI).
Simply “once a second” is not good enough if we check the time 0.5 seconds after DST switch.
If “once a second” was implemented as “once every wall-clock second”, IMHO that would be fine. So the test would have to be something like
(prevUsecs // 1000000) ~= (nowUsecs // 1000000) ifTrue: [self updateOffsetFromUTC]
Right?Excellent point. So the drift algorithm to provide an accurate clock can be extended to check the time zone whenever the new time is at a different second to the previous value.