Path: utzoo!utgpu!attcan!uunet!lll-winken!ncis.tis.llnl.gov!helios.ee.lbl.gov!ux1!beard
From: beard@ux1 (Patrick C Beard)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Stuffit time-stamp
Message-ID: <3581@helios.ee.lbl.gov>
Date: 12 Aug 89 10:02:50 GMT
References: <89073016521584@masnet.uucp>
Sender: usenet@helios.ee.lbl.gov
Reply-To: beard@ux1 (Patrick C Beard)
Organization: Lawrence Berkeley Laboratory, Berkeley
Lines: 22

In article <89073016521584@masnet.uucp> david.dmytryshyn@f428.n250.z1.fidonet.org (david dmytryshyn) writes:
>
>Need some help...  Working on a Stuffit viewer on MSDOS machine, and can't
>quite figure out how dates are encoded into the 32 bit numbers on a macintosh 
>file.  I'm looking for examples converting to numbers and back again.
>

From Inside Macintosh, Volume II, pg. 369:

"It's stored as a number of seconds since midnight, January 1, 1904, and
is updated every second."

Conversion routines are simple, just keep track of leap years and days
of the week.  If you need more, I'm sure somebody is waiting in the wings
with a suitable routine (although routines are in the Mac ROM to do it 
for Mac programmers).


-------------------------------------------------------------------------------
-  Patrick Beard, Macintosh Programmer                        (beard@lbl.gov) -
-  Berkeley Systems, Inc.  "..............Good day!" - Paul Harvey  -
-------------------------------------------------------------------------------