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

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!nic.unh.edu!anchor.unh.edu!pas
  3. From: pas@anchor.unh.edu (Paul A Sand)
  4. Subject: bug in ctime.pl?
  5. Message-ID: <1992Jul21.201121.15732@nic.unh.edu>
  6. Sender: news@nic.unh.edu (USENET News System)
  7. Organization: University of New Hampshire
  8. Date: Tue, 21 Jul 1992 20:11:21 GMT
  9. Lines: 16
  10.  
  11. Based on some peculiar behavior, I looked at the ctime.pl library
  12. file. It contains the line:
  13.  
  14.      $year += ($year < 70) ? 2000 : 1900;
  15.  
  16. where $year is one of the elements returned from gmtime() or
  17. localtime(). Looking at the definitions of what *those* return,
  18. it seems the statement should be simply:
  19.  
  20.     $year += 1900;
  21.  
  22. Or am I missing something subtle?
  23. -- 
  24. -- Paul A. Sand           | I learned to put the [toilet] seat down...it
  25. -- Univ. of New Hampshire | makes you look like a warm, caring, sensitive
  26. -- pas@kepler.unh.edu     | human being. (Prof. R. Noble, from r.h.f.)
  27.