[ABE.pm] time processing

Ricardo SIGNES perl.abe at rjbs.manxome.org
Mon Nov 19 10:27:16 PST 2007


* Ted Fiedler <fiedlert at gmail.com> [2007-11-19T13:13:52]
> >  my $hms = DateTime::Format::Strptime->new(pattern => '%T');
> >  my $datetime = $hms->parse_datetime('12:23:34');
> 
> That returns '00001-01-01T12:23:34'
> 
> This doesn't seem to do what I need. I need a time not a datetime such as 1
> hour 54 minues 18 seconds (01:54:18) to be converted to seconds, divided by
> a distance (13.1) , and turnd back into a time ( pace ) such as 8 minutes 44
> seconds, but formatted as 8:44. Precise may be overkill, but so far the only
> module, that Ive found to do this. Or am I missing the boat here?

Can't you get an absolute difference between that time and 0001-01-01 00:00:00
in seconds?

-- 
rjbs


More information about the ABE-pm mailing list