There's more than one way to do things | |
PerlMonks |
DateTime and hour 0by tcf03 (Deacon) |
on Apr 18, 2005 at 13:13 UTC ( [id://448837]=perlquestion: print w/replies, xml ) | Need Help?? |
tcf03 has asked for the wisdom of the Perl Monks concerning the following question:
Im using DateTime in a script and I keep getting the following error when entering 0 or 00 for my hour.
and here is how DateTime is using $hour: any Ideas about the error? Ted UPDATE another oddity is that 00 does work (in the hour field) as long as $minute >= 10. if I set minute to anything less that 10. Im looking through Epoch.pm from DateTime::Format::Epoch, but its a bit above my skill level. UPDATE2 fglock nailed it when he suggested changing the algorithm. Here is the new code that works. Thanks for all you're suggestions. There is still the messiness of zero padding, but ill figure that out in time - if anyone has suggestions that would be cool.
Back to
Seekers of Perl Wisdom
|
|