home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!darwin.sura.net!mips!a2i!dhesi
- From: dhesi@rahul.net (Rahul Dhesi)
- Subject: Re: bug in ctime.pl?
- Message-ID: <BrryKL.Msx@rahul.net>
- Sender: news@rahul.net (Usenet News)
- Nntp-Posting-Host: bolero
- Organization: a2i network
- References: <1992Jul21.201121.15732@nic.unh.edu>
- Date: Wed, 22 Jul 1992 05:14:44 GMT
- Lines: 21
-
- In <1992Jul21.201121.15732@nic.unh.edu> pas@anchor.unh.edu (Paul A Sand)
- wonders if ctime.pl should do $year += 1900 instead of
-
- > $year += ($year < 70) ? 2000 : 1900;
-
- Both are identical at this time. However, some time in the next
- century, when the 32-bit value of Unix time overflows and time begins
- running backwards, the two will give different results. Whichever form
- gives a value closer to the truth will then be preferable; I believe
- the longer form will be the one.
-
- (Aside: The above is somewhat analogous to preferring a clock that
- doesn't run to one that runs slowly, because the one that doesn't run
- shows the correct time twice a day. I was considering using ntp, but I
- said, what the heck! I'll just stop my system clock altogether and do
- much better. Then I realized that what makes this work is counting
- modulo 12. So my next plan is to build a 3.584962501 bit counter and
- use that for my clock.)
- --
- Rahul Dhesi <dhesi@rahul.net>
- also: dhesi@cirrus.com
-