I’m parsing SIP messages and we need to include milliseconds in the human readable part (i.e 2011/09/08 00:10:17.997) we need to convert them to Epoch time using Perl, I have found bunch of examples using from Human Readable to Epoch, but not including milliseconds, is this possible? I have found DateTime in CPAN but im having a problem installing it. so looking for other options:
Example
$epoch = convert(2011/09/08 00:10:17.997)
print $epoch
and prints: 1315183552
Fix whatever problem it is with your system that is preventing you from installing a module.
Barring that, Epoch time only has second resolution. Strip off the milliseconds and convert using Time::Local (You’ll need to parse your SIP message yourself)
If it’s really important, round the second using the milliseconds.