[comp.sys.mac.system] Timekeeping

cheshire@Neon.Stanford.EDU (Stuart David Cheshire) (02/26/91)

UNIX machines keep their clocks set to GMT, and all internal storage of time
stamps is in GMT, communication across the net to other machines uses GMT, and
the only time it is converted to local time zone is when it is to be printed
out for a human to read.

Macs on the other hand keep their clocks set to local time, and have to convert
to GMT when talking to other machines on the net. This means that if I create a
file at 11.00am Friday in England, and then fly to SFO, arriving 8.00pm local
time, and turn my Mac on, the file says it was created 11.00am, which is when
I clearly remember creating it. Unfortunately the meaning of this 11.00am is
a little vague. It wasn't 11.00am California time, it wasn't 11.00am GMT (well
it was, but only coincidentally), yet despite having no real meaning it seems
to be the time which makes most sense to me as a human. Unfortunately, if I
had travelled a little faster, or sent the file by e-mail it would make no
sense at all to a backup program or a compiler trying to re-make a project.

Questions:

1. How does System 7 work? Does it use GMT internally like UNIX?
2. What ideas do people have on this problem? Networks are getting bigger.
   Soon I will work on a joint project with people in London, getting my files
   from a server in New York. Unless we solve this problem of file timestamping
   we are all going to run into problems.

Stuart Cheshire (cheshire@cs.stanford.edu)

amanda@visix.com (Amanda Walker) (02/26/91)

cheshire@Neon.Stanford.EDU (Stuart David Cheshire) writes:
>1. How does System 7 work? Does it use GMT internally like UNIX?

Not that I know of.

>2. What ideas do people have on this problem?

Well, the Script Manager stores the current offset from GMT (as well
as a currently unused Daylight Saving Time offset), so it is possible
to convert to GMT without much problem.  AppleShare also addresses
this problem in a fairly cool way: when you sign on to a file server,
the Mac computes the time differential between itself and the server,
and (I believe) factors this into any time calculations.  This helps
to prevent the kind of "time skew" you sometimes see on NFS servers
that aren't running NTP (network time protocol).

The basic problem is that the Mac file system stores local times, on
the assumption that the Mac is not going to change time zones, which
is not as good an assumption as it used to be.

It might be possible to write an INIT that would adjust file times by
the current GMT offset.  This would take care of a lot of the problem,
as long as you used the Map control panel to indicate that you've moved
the Mac, instead of changing the time directly...

-- 
Amanda Walker						      amanda@visix.com
Visix Software Inc.					...!uunet!visix!amanda
--
There can't be a crisis next week--my schedule is already full.