in reply to Date to Epoch conversion
Just cause I can't resist showing one more way to handle this :)
You can use Date::Parse for this as well. The following snippet shows how to go from your string, to a unix timestamp (using Date::Parse::str2time), and back to your string again (using Date::Format::time2str):
perl -MDate::Format -MDate::Parse -e ' print time2str("%a %h %e %Y, %r %Z", str2time("Wed Feb 18 2004, 11:03:45 AM EST")), $/;'
- Cees
|
|---|