Perl-Sensitive Sunglasses | |
PerlMonks |
Re: How do I find difference between two timestamps?by tall_man (Parson) |
on Nov 16, 2004 at 17:13 UTC ( [id://408171]=note: print w/replies, xml ) | Need Help?? |
The timegm function in Time::Local can convert a Zulu (GMT) time into a timestamp. Since your date formats are nonstandard, it would be simplest to break out the year, month, day, hours, minutes, and seconds with a regular expression or substrings, then do:
These times can be subtracted to give differences in seconds. You'll have to subtract the milliseconds separately and add that to the difference.
In Section
Seekers of Perl Wisdom
|
|