in reply to I have seen a bug of Time::Local module

$now[4]+1

No. The number of the month is zero based in all the localtime and timelocal APIs. Only strftime and sprintf want the number of the month adjusted.

Update: D'oh - I should've known that all the *time functions behave the same with regards to their input parameters.

Replies are listed 'Best First'.
Re^2: I have seen a bug of Time::Local module
by ikegami (Patriarch) on Mar 31, 2011 at 07:27 UTC
    Not strftime. Valid use:
    strftime("%Y%m%d%H%M%S", localtime)