CMOS: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
m →‎See Also: Fixed Broken Link
Brendan (talk | contribs)
Century Register As Time and Date Sanity Check
Line 139:
 
If there is no century register then software can guess. For example, a piece of software written in 1990 can use the (2 digit) year register to determine the most likely century - if the RTC year register is higher than or equal to 90 then the year is probably be "19YY" and if the RTC year register is less than 90 than the year must be "20YY". In this way, software can correctly determine the century for up to 99 years after the software is written.
 
 
==== Century Register As Time and Date Sanity Check ====
 
If the CMOS/RTC has a century register, your software was released 2014, and the CMOS/RTC says the century and year are 2008; then obviously the CMOS/RTC must be wrong.
 
Similarly, people tend to update their OS occasionally. If the CMOS/RTC has a century register, your software was released 2014, and the CMOS/RTC says the century and year are 2154; then it's unlikely that the OS hasn't been updated for 140 years, and far more likely that the CMOS/RTC is wrong.
 
Essentially; the method (described above) for guessing the century when there is no century register is much more reliable than the CMOS/RTC century register (if it exists). This means that the century register (if/when present) can be used in reverse, as a way to check if the CMOS/RTC time and date are sane (or if the CMOS/RTC has a flat battery or something).
 
Basically, you'd guess the century (based on the software's release data and RTC's year), then see if the CMOS/RTC century is the same as your guess, and if it's not the same assume that the CMOS/RTC has an invalid date and time.