Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Operating System Utilities /
Chapter 4 - Date, Time, and Measurement Utilities / Date, Time, and Measurement Utilities Reference
Routines


Getting the Current Date and Time

At system startup time, system software uses the ReadDateTime function to copy the current date-time information from the clock chip into low memory. You can access this date-time information as the number of seconds elapsed since midnight of January 1, 1904 or as a date and time. To obtain the current date-time information expressed as the number of seconds elapsed since midnight of January 1, 1904, use the GetDateTime procedure. To obtain the current date-time information expressed as a date and time, use the GetTime procedure.

IMPORTANT
If an application disables interrupts for longer than a second, the date-time information returned by the GetDateTime and GetTime procedures might not be exact. The GetDateTime and GetTime procedures are intended to provide fairly accurate time information, but not scientifically precise data.

Subtopics
ReadDateTime
GetDateTime
GetTime

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996