laziness, impatience, and hubris | |
PerlMonks |
Re^4: RFC 822 date manipulation without DateTime module?by GhodMode (Pilgrim) |
on Jun 15, 2009 at 02:43 UTC ( [id://771519]=note: print w/replies, xml ) | Need Help?? |
That is exactly what I was looking for. Unfortunately, it doesn't recognize all of the time zone specifiers. Example: results in ghodmode@home:perl ] ./timepiece.pl I think I'm going to rely on the call to the shell's date for now. Later, if I want to make the program more portable, I'll probably just create a hash with a short list of time zone specifiers to convert them to the appropriate numeric offset. That would break if the program encountered a new zone, but it would work for my purposes. Of course Date::Time is the right way to do it, but it's less portable because of the external dependency. I like Time::Piece, though. I didn't know about this module and I anticipate using it a lot more in the future. -- -- GhodmodeBlessed is he who has found his work; let him ask no other blessedness. -- Thomas Carlyle
In Section
Seekers of Perl Wisdom
|
|