Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: time difference calculation

by poolpi (Hermit)
on Oct 28, 2013 at 12:41 UTC ( #1059972=note: print w/replies, xml ) Need Help??


in reply to time difference calculation

Hi,
You might try DateTime module and one of the math method, for example :$dt->delta_ms( $datetime )

#!/usr/bin/perl use strict; use warnings; use DateTime; my $now = DateTime->now; $now->iso8601; $now->subtract( seconds => 101 )->iso8601;


Update: piece of code


hth,
PooLpi

The stone that the builder refused, will always be the head cornerstone.
[ Robert Nesta MARLEY ]

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1059972]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2023-02-01 15:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (10 votes). Check out past polls.

    Notices?