wiki:TBR/Review/DateTimeHardwareIssues

DateTimeHardwareIssues

Numerous Real-Time Clock (RTC) controllers provide only a two-digit Binary Coded Decimal (BCD) representation for the current year. Without software correction, these chips are a classic example of the Y2K problem. When the RTC rolls the year register over from 99 to 00, the device has no idea whether the year is 1900 or 2000. It is the responsibility of the device driver to recognize this condition and correct for it. The most common technique used is to assume that all years prior to either the existence of the board or RTEMS are past 2000. The starting year (epoch) for RTEMS is 1988. Thus,

  • Chip year values 88-99 are interpreted as years 1988-1999.
  • Chip year values 00-87 are interpreted as years 2000-2087.

Using this technique, a RTC using a two-digit BCD representation of the current year will overflow on January 1, 2088.

Last modified on Jul 13, 2007 at 12:02:51 AM Last modified on Jul 13, 2007, 12:02:51 AM