|Perl Monk, Perl Meditation|
What's "Better" DateTime or localtime?by mmartin (Monk)
|on Jul 11, 2013 at 17:17 UTC||Need Help??|
mmartin has asked for the
wisdom of the Perl Monks concerning the following question:
I was wondering if one method is 'better' then the other...?
I'm using the Date and Time values quite a few times in my script to calculate what is basically a 'start' and
'end' times to be used within another script. Which can be present and/or future date and times...
So is one of these 2 methods below better to use, for any reason, then the other one?
Each of those produces pretty much the same result except the Month is Zero-based and the year is
the number of years since 1900 (*i.e. this year == 113, get actual year by "$year += 1900")...
I'm using each piece of the Date and Time variables at some point later on in the script. So I do need
each individual piece of the date and Time vars cause I use them quite a few times in the script.
Any thoughts or suggestions would be much appreciated.
Thanks in Advance,