in reply to The function localtime(time) returns wrong month . How to overcome this problem ??
Add 1 to the number returned for month. If you notice, the year is also "wrong". You'd need to add 1900 to it, to get the current year. I'm not sure whether this is a "feature" or a bug, but it's what we've got - so we have to deal with it.
When you run into problems, the first thing to do is to review the documentation about the function, module, operator, etc. that you're trying to use. Usually this will explain the quirks and idiosyncrasies that appear. A good place to start is by typing 'perldoc perldoc' from the command line. Another place is right here on PM, using the Search or Super Search features.
PM has a whole bunch of helpful, cheerful monks who will try to help you - but there are occasional monks who are impatient with people who appear unwilling to make an effort first. It's better to try to find the answer yourself, then ask - and tell people what you've tried so far.
|
|---|