Need a book? Engineering books recommendations...

Return to index: [Subject] [Thread] [Date] [Author]

y2k compliance / The computer clock

[Subject Prev][Subject Next][Thread Prev][Thread Next]

this is FYI, but very useful information to y2k matters

Background on the Year 2000 Issue

How does the computer clock work?

Every personal computer contains two clocks: a built-in hardware clock and a virtual clock. The hardware clock (real-time clock) runs whether the system is on or off. The virtual clock (system clock) is set to the real-time clock when the computer is turned on and exists only while the computer is operating. While the computer is up and running, the two clocks run independent of each other.

The system clock is a 24-hour timer and has no real concept of days, whereas the real-time clock tracks the time and date. In fact, the system clock has no concept of traditional hours, minutes, and seconds. It merely increments a counter 18.2 times per second. The operating system, which is dependent upon the system clock for the time, converts the counter into hours, minutes and seconds. As for the date, the operating system reads the real-time clock via the BIOS during initialization, then tracks the date independently based on the virtual system clock rolling over midnight.

The real-time clocks used in today's personal computers do not track centuries only years, such as '96, are tracked. After December 31, 1999, the real-time clock merely indicates year '00. It is the BIOS's responsibility to track the century and preserve that information in the real-time clock's nonvolatile memory. The BIOS assumes that the years 1900 through 1979 cannot occur, so when the year is within 00 - 79 and the century information is 19, the BIOS sets the century information to 20. If the BIOS does not track the century, the operating system will be given an invalid year and most likely will assume 1980. (Microsoft operating systems do not support dates earlier than 1980.)


Since the two clocks run independently, the real-time clock can be set to any nonsensical value and the operating system will not notice. Such will occur January 1, 2000 if your system does not support the year 2000. As long as the system is running, the operating system will correctly support the occurrence of the year 2000. Problems will occur, however, when the system is rebooted or powered off then on. This is the first caveat: setting the date and time just prior to the year 2000 and just letting the new year occur is not a valid test. The real-time clock may be invalid, but the date according to the operating system will be correct. The system must be powered off then on to complete this type of test, but there is still a catch?

The second caveat applies when the operating system is used to set the date and time. The system clock will always be set by the operating system. However, not all operating systems will concurrently set the real-time clock with the system clock. In this scenario, the above methodology may cause a system that correctly supports the year 2000 to fail if the operating system does not set the real-time clock as well.


>* Read list FAQ at:
>* This email was sent to you via Structural Engineers
>* Association of Southern California (SEAOSC) server. To
>* subscribe (no fee) to the list, send email to
>* admin(--nospam--at) and in the body of the message type
>* "join seaint" (no quotes). To Unsubscribe, send email
>* to admin(--nospam--at) and in the body of the message
>* type "leave seaint" (no quotes). For questions, send
>* email to seaint-ad(--nospam--at) Remember, any email you
>* send to the list is public domain and may be re-posted
>* without your permission. Make sure you visit our web
>* site at:


| Ido Shimony |
| |
| Bridge Department |
| Bieswenger, Hoch and Associates |
| North Miami Beach, Florida |