Re: Y2k compliance

Mike A. Harris (mharris@ican.net)
Mon, 7 Dec 1998 04:13:20 -0500 (EST)


On Fri, 4 Dec 1998, S. Shore wrote:

>In fact, the year 2000 isn't a leap year. A little-known rule of leapyears
>(iirc) is that any year divisible by 100 (i think) can't be a leapyear.

Which illustrates the fact of the last letter I posted. The last
letter was in response to someone stating that if a programmer
knew what you just stated (that years divisible by 100 are not
leap years), that they also would know that years divisible by
400 ARE leap years. You've just illustrated that it is possible
for someone to know PART of the formula, but not the whole thing.

Thanks for proving my point (although I'm sure it was
unintentional). Years divisible by 100 are not leap years unless
they are also divisible by 400. So, 1200, 1600, 2000, and 2400
*ARE* leap years. So, people and software that treat every 4th
year as a leap year should work ok as far as leap years are
concerned in 2000. It is 2100, 2200, 2300 where they would fail.

>On Fri, 4 Dec 1998 robbie@scot-mur.demon.co.uk wrote:
>
>> Date: Fri, 4 Dec 1998 01:03:30 +0000
>> From: robbie@scot-mur.demon.co.uk
>> To: Linux Kernel List <linux-kernel@vger.rutgers.edu>
>> Subject: Re: Y2k compliance
>>
>> On Thu, Dec 03, 1998 at 10:30:44AM -0500, Gregory Maxwell wrote:
>> > On Thu, 3 Dec 1998, Chris Wedgwood wrote:
>> >
>> > > On Wed, Dec 02, 1998 at 11:53:57AM +1030, Alan Modra wrote:
>> > >
>> > > > Linux ignores the RTC century byte (for good reason). Before I put
>> > > > this fix in, when the year wrapped to 00 Linux would read the RTC
>> > > > year as 1900. So a reboot (who does that anyway?) would give a
>> > > > classic Y2K time warp.
>> > >
>> > > So how does it know what century it is?
>> >
>> > If the right part of the year is less then z it's 20xx if it's greater
>> > it's 19xx
>> So how does it cope with 2000 being a leep year? In the small ammount of
>> experimenting I have done, the year goes back to 1980, not 1900. I think
>> linux needs some way of dealing with these buggy machines, probably in
>> user space.
>> >
>> >
>> > -
>> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> > the body of a message to majordomo@vger.rutgers.edu
>> > Please read the FAQ at http://www.tux.org/lkml/
>>
>> --
>>
>> Robbie Murray
>>
>> -
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo@vger.rutgers.edu
>> Please read the FAQ at http://www.tux.org/lkml/
>>
>
>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.rutgers.edu
>Please read the FAQ at http://www.tux.org/lkml/
>

--
Mike A. Harris  -  Computer Consultant  -  Linux advocate

Linux software galore: http://freshmeat.net

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/