in reply to Re: suggestions for log rotater...
in thread suggestions for log rotater...

You may want to $mon++ since $mon goes from 0 to 11 rather than 1 to 12.

Hope this helps :-)

Replies are listed 'Best First'.
Re: Re: Re: suggestions for log rotater...
by Rhose (Priest) on Nov 05, 2001 at 23:55 UTC
    And make sure to add 1900 to the year...

    use strict; use Time::localtime; my $mCurrentTime; my $mTimeStamp; $mCurrentTime = localtime; $mTimeStamp = sprintf( '%04d%02d%02d', ($mCurrentTime->year)+1900, ($mCurrentTime->mon)+1, $mCurrentTime->mday );