[Date Prev] [Date Next] | [Thread Prev] [Thread Next] | [Date Index] [Thread Index] |
Re: [nocol-users] Y2K bug fix for genweb.pl (4.2.1) Solaris
|
On Feb 25, 4:07pm, Rick Beebe wrote: > Subject: Re: [nocol-users] Y2K bug fix for genweb.pl (4.2.1) Solaris > > Probably old news, but I found a minor Y2K bug in genweb.pl: > > > > $today = "$z1[$mon]/$z1[$mday]/19$year $hour:$z1[$min]"; > > > > OK? to change it to: > > > > $y2k = 1900 + $year; > > $today = "$z1[$mon]/$z1[$mday]/$y2k $hour:$z1[$min]"; > > > > Thanks for catching that. $year is never used again, so > $year += 1900; > $today = "$z1[$mon]/$z1[$mday]/$year $hour:$z1[$min]"; > > works just as well and saves a variable. (I'm trying to save all the > variables I can for use in my retirement.) And to cater for international users who can't understand why Americans put dates in the wrong order (:-)) it would be better to write the whole thing as: $today = "$year/$z1[$mon]/$z1[$mday] $hour:$z1[$min]"; i.e. a much more neutral format. Frank -- Frank Crawford Email: frank@ansto.gov.au Postal: PMB 1 Site Systems Manager Phone: +61 2 9717 3015 Menai NSW 2234 ANSTO Fax: +61 2 9717 9273 Australia PGP Fingerprint: (8BB1C821) 06 4F 35 82 1D D6 0E 56 9F AB B8 F7 67 AF 1A 9D |