Documentation Archive Developer
Search

ADC Home > Reference Library > Technical Q&As > Legacy Documents > Mac OS 9 & Earlier >

Legacy Documentclose button

Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.

Current information on this Reference Library topic can be found here:

System Clock

Q Has the manner in which the system clock keeps time changed? The Date & Time control panel in System 7.5 only allows a range of years from 1920 through 2019, and I thought that all clock ticks counted up from 1904.

A The date and time information in the Date & Time control panel is obtained from the system global variable 'Time', which is a four-byte value that stores the number of seconds elapsed since midnight, January 1, 1904. The System 7.5 Date & Time Control Panel allows you to access the range of dates from 1 January 1920 through 31 December 2019 (the System 7.1 Date & Time Control Panel did also), but this is not the result of any changes in the global variable 'Time' -- it is merely an interface change.

The 'Ticks' global variable, which you can access with the function 'TickCount', returns the number of ticks elapsed since you last started up your system. This has not changed either.
Developer CD, March 1995: Technical Documentation: Inside Macintosh: Operating System Utils: Chapter 4 - Date, Time and Measurement Utilities: page 4-4.

Developer CD, March 1995: Documentation: Inside Macintosh: Macintosh TB Essentials: Chapter 2 - Event Manager: page 2-112.

Updated: 1-May-95