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

Re: Personal y2k issue [was: *ping*]




I stand corrected in my sloppy use of language.  Of course you are
correct.  I should have called it a "Perl programming bug".  The fix
certainly didn't involve changing the way that localtime worked.  In fact,
defining the year as a count from a fixed origin is a very tidy way to
describe dates (and is also the way that most cultures measure time).  It
is no fault of Perl that programmers ignore the proper use of the call. 

						- Andy Johnston


On 2 Jan 2000, Russ Allbery wrote:

> anderson johnston <ajohns5@alumni.umbc.edu> writes:
> 
> > I don't use X11 to watch my money disappear, but I did have problems
> > with exactly that perl bug in some legacy code written by my
> > second-order predecessor.  It seems to be cropping up all over the list.
> > If anyone has perl code that builds a four-digit year it's probably a
> > good idea to check and make sure the coder didn't just stick a "19" on
> > the front of the (until yesterday) two digits that perl returned.
> 
> This is no more a Perl bug than it is a C bug.  If the documented behavior
> of localtime, which has remained unchanged since the early days of the C
> library is to be called a bug, it's still unfair to place the blame on
> Perl.  The tm_year field is epoch-based; it returns the number of years
> since 1900 AD and always has.  If you found a system in which it returned
> 00, that system would have an extremely serious Y2K bug.
> 

-------------------------------------------------------------------------------
    _/                   /_           |	Andy Johnston
   _/_/                  /_           |	
  _/  _/    _/_/_/   /_/_/_  /_   /_  |	ajohns5@alumni.umbc.edu
 _/_/_/_/   _/   _/ /_  /_    /_ /_   |	
_/      _/  _/   _   /_/_/_    /_     |	http://alumni.umbc.edu/~ajohns5
                              /_      |
                             /_       | (PGP Public Keys at web site)
...............................................................................
                    PGP Key Fingerprints (17-jan-1998): 
     (afj98) 1024/9E3E581D  37 6F 8E 76 99 85 B3 AC 44 89 CD EC 72 42 74 8A
  (afjsig98) 1024/0E717B1D  DB 3E 9A DB B8 EB 32 C4 D8 E8 B3 DA 1E C8 06 33
-------------------------------------------------------------------------------