Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Extract System Time & Date in a perl so that it can be used in a perl program

by Random_Walk (Prior)
on Jan 31, 2006 at 17:19 UTC ( #526807=note: print w/replies, xml ) Need Help??


in reply to Re: Extract System Time & Date in a perl so that it can be used in a perl program
in thread Extract System Time & Date in a perl so that it can be used in a perl program

davorg++ POSIX++ strftime++

I always use strftime and print out using ISO 8601 time format, here is a swift example

> perl -MPOSIX -le'print strftime("%Y-%m-%d %X", localtime)' 2006-01-31 18:13:37

If you print your times in this format it makes them easy to compare or sort with gt/lt

Cheers,
R.

Pereant, qui ante nos nostra dixerunt!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (11)
As of 2016-09-26 16:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (485 votes). Check out past polls.