Important: The information in this document is obsolete and should not be used for new development.
Getting the Current Date and Time
At system startup time, system software uses theReadDateTimefunction 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 theGetDateTimeprocedure. To obtain the current date-time information expressed as a date and time, use theGetTimeprocedure.
- IMPORTANT
- If an application disables interrupts for longer than a second, the date-time information returned by the
GetDateTimeandGetTimeprocedures might not be exact. TheGetDateTimeandGetTimeprocedures are intended to provide fairly accurate time information, but not scientifically precise data.![]()
Subtopics
- ReadDateTime
- GetDateTime
- GetTime