Slashdot Mirror


User: perlgnome

perlgnome's activity in the archive.

Stories
0
Comments
1
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 1

  1. Re:date bug (could be my bad code) on Y2K Rollover - Post Your Experiences Here! · · Score: 1

    The month value you get runs from 0 .. 11, with 0 being January, so you need to add 1 to it to get your "real" month number.

    my($day, $month, $year) = (localtime())[3..5];
    $year += 1900;
    $month += 1;
    print "$year-$month-$day\n";