home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / perl / 4862 < prev    next >
Encoding:
Text File  |  1992-07-21  |  1.3 KB  |  34 lines

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