2909
XL2 Leap Year Bugs
XL200

The V3 XL controllers executed Leap Year one year late. The V4 controllers executed Leap Year, effectively, two years late.

The cause is related to the Real Time clock chip in the hardware. The chip only stores two digits for the year and has a range 00-99. The software adds an offset to the year when reading the chip and subtracts an offset when writing to the chip. In an attempt to utilize the full date range of the chip the software was using an offset based on when the Real Time Clock driver was written. For V3 controllers a 2001 offset was being used. For V4 controllers a 2006 offset was being used. In order for the leap year function within the chip to work correctly the offset year needed to be a leap year.

The solution involved using 2000 for the offset in both cases. However, simply changing the offset would cause the customer issues in the same way that the Leap Day bug did. After an update the date stored in the chip would be interpreted as a date in the past.

The solution also includes attempting to detect controllers that have invalid dates stored in the clock chip. This is done by comparing the Year that XL200 Application was created to the year stored in the clock chip. The year stored in the clock chip should never be older than the application creation date.

V3 controllers that have invalid dates may have a year that is one year older than it should be. If the controller date year is less than the application creation year. The controllers date is updated to the year the application was created.

V4 controllers that have invalid dates will have dates that are 6 years older than it should be. If the controller date year is less than the application creation year, six years is added to the controller date.

In both V3 and V4 controllers, the Set Year setup parameter can no longer be programmed with a year that is older than the year the application was created. This prevents the controller from erroneously detecting an invalid date and trying to correct it.

The detection solution relies on the fact that we have regular releases. Usually new releases occur minimally every few months. If a customer updates to a release, with the bug fix, that is older than one year, we will not be able to detect if their controller has been affected by the leap year bug and we will be unable to automatically correct the date. In addition, if they update to a release that still has the leap year bug, they are re-infecting that controller with the bug.

Model Version Released
XL2OL 4.35.00 3/2/2016
XL2CL 4.35.00 3/2/2016
XL220OL 4.08.00 11/14/2016
Hardware Test 4.05.00 9/25/2026
XL2OL 3.72.00 3/2/2016
XL2CL 3.72.00 3/2/2016