in reply to
The function localtime(time) returns wrong month . How to overcome this problem ??
I wonder if you'd care to suggest how we could improve the documentation for localtime to make it more obvious how to solve your problem. Currently the docs say this:
$mday is the day of the month, and
$mon is the month itself, in the range 0..11 with 0 indicating
January and 11 indicating December.
If you're formatting dates for outputting to the user, let me recommend a proper date formatting tool, like POSIX::strftime or DateTime or Date::Calc.
If all you need is the number of the month, how about just adding 1 to the number?