Re: Daylight Saving patch for New Zealand



New Zealand has now crossed over into daylight savings, and I haven't
seen any major problems on my patched systems.

Thanks to a heads-up from a member of my user group, we have noticed two
problems, and further investigation has revealed these to be bugs in Mac
OS X which will affect other time zones. They are not related to our
patching the time zone rules, as they also occur on an unpatched system.

In the 12 hour period leading up to the daylight saving change, files
written by certain older applications have creation or modification
times which are one or more hours early (e.g. a file created at 11 pm
says it was created at 10 pm). The affected appliations include
AppleWorks, Eudora, MacSoup, Internet Explorer and FileMaker Pro 6.

All of these are old Mac OS 9 (or earlier) applications which were
ported to Mac OS X, which probably use the really old Carbon File
Manager API calls. A detailed investigation (by Glenn Anderson) has
revealed a bug in a particular function in Mac OS X (DoMacToUNIXDate)
which is messing up a local time to UTC conversion, due to incorrect use
of the localtime() function.

This results in the affected applications setting the creation or
modification time on files an hour earlier. If they do a GetFileInfo and
SetFileInfo operation repeatedly, each such operation sets the creation
or modification time back an addtional hour for each SetFileInfo.

This only happens for a period shortly before the start of daylight
saving (and a similar effect will occur around the end of daylight
saving). The time window in which it will occur is probably determined
by the local time zone's offset from UTC. New Zealand standard time is
12 hours ahead of UTC, so we see the problem for 12 hours.


The second bug is with the World Clock in Dashboard. It shows exactly
the same problem, but in the 12 hours AFTER daylight saving started. In
this case, any world clock not showing the local time will be an hour
slow, but it comes right 12 hours after daylight saving started. I
expect this one will have a similar pattern of behaviour in other time
zones (but with a smaller margin of error, depending on the local UTC
offset). We haven't investigated further.

--
David Empson
dempson@xxxxxxxxxxxxx
.



Relevant Pages

  • Re: Daylight saving in NSW
    ... I noticed my computer clock was put back an hour ... Which version of Mac OS X are you running? ... We had a similar problem in New Zealand back in September, ... as the end of daylight saving moved ahead by ...
    (comp.sys.mac.apps)
  • Re: How to prevent OS 10.3.5 from auto setting daylight saving time?
    ... decided to extend Daylight Saving Time one additional month. ... my Mac will automatically revert to Standard Time a month ... think EVERYONE'S clocks on their Macs all change at on the same dates ...
    (comp.sys.mac.system)
  • Re: datetime, tzinfo ... strange conversion?
    ... indicate that daylight saving is currently in effect. ... always do your date/time calculations as far as possible in UTC. ... Only convert to local time at the last possible step, before displaying ...
    (comp.lang.python)
  • Re: Help with check time function
    ... using the UTC functions. ... The chage to/from DST normally occurs ... The clock for my mobile phone message system is in the same timezone ... Rather than daylight saving in summer, ...
    (comp.lang.javascript)
  • Re: Error in time zone settings
    ... http://wwp.greenwichmeantime.com and as read by JavaScript in a test ... Both PC's show the correct local time in the Systray area, ... Zone locked to Greenwich and Daylight Saving OFF. ... It reports ...
    (microsoft.public.windowsxp.general)