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


Setting the Current Date and Time

You can modify the date-time information stored in the clock chip by using the SetDateTime function or the SetTime procedure. The two routines differ in the type of arguments they require. The SetDateTime function requires that the new date-time information be expressed as the number of seconds elapsed since midnight of January 1, 1904 (using a value of type LongInt). The SetTime procedure requires that the new date-time information be expressed as a date and time (using a value of type DateTimeRec).

IMPORTANT
Users can change the current date and time stored in both the system global variable Time and in the clock chip by using the General Controls control panel, Date & Time control panel, or the Alarm Clock desk accessory. In general, your application should not directly change the current date-time information. If your application does need to modify the current date-time information, it should instruct the user how to change the date and time.

Subtopics
SetDateTime
SetTime

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996