[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Y2K compatibility

Silverio Diquigiovanni wrote:
> Joel Sherrill wrote:
> > 1900 was not a leap year.
> > 2000 is a leap year.
> > The bad RTC will think Feb 29, 2000 is actually March 1, 1900.
> > Is that the problem in a nutshell ?
> Yes, the integrated circuit (CHIP) which I use isn't Y2K compliant
> because it uses only 2 digit for represent the year. I use this CHIP to
> maintain time track during power off state of my hardware.
> The chip isn't awareness of 1999-2000 step and then it mistakes the 2000
> leap year and so loses a precious day informations between 28 February
> and 1 March.
> This bug can be fixed very simply including a only one write bit flag
> and a startup routine which check when date is bottom 28 Febrary 2000.

Doesn't this have to be checked every time the RTC is set?
> I have inserted this fact to inform other developers and so avoid bud
> surprise.

FWIW I have looked at the Linux and BSD RTC code over the past few days
and I did not see any attempt to correct for this either.  (I could 
have missed it though.)  Does the RTC in PCs suffer from this problem?  
If so, there are a lot more people impacted by this than RTEMS users. :)
> Silverio Diquigiovanni
> silverio.di at qem.it
> www.qem.it

Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985