ReadDateTime
ReadDateTime Copy clock-chip time to Time variable
#include <OSUtils.h> Operating System Utilities
long *secs ; receives number of seconds since 01/01/04
returns error reading clock; 0=no error
ReadDateTime accesses the clock chip directly and stores its return value
into the low-memory variable Time (at 0x020C) and into the specified
variable. Applications normally use GetDateTime or GetTime.
secs is the address of a 4-byte variable. Upon return, it contains the
number of seconds since January 1, 1904 (as tracked by the
real-time clock hardware).
Returns: an OSErr; an integer Error Code. It will be one of:
noErr (0) No error
clkRdErr (-85) Clock read error

Notes: You can convert the secs value to a more easily understood value (i.e., a
You can set the clock-chip to a new time/date using SetDateTime; though
this is normally performed via the Control Panel DA.
Since the base date for the any "raw seconds" value is 1/1/1904 and since
secs is a 32-bit value, you won't be able to calculate with dates beyond
February 6, 2040.