Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

RE: Date & Time system variables

by da w00t (Sexton)
on Dec 30, 1999 at 03:36 UTC ( [id://1539]=note: print w/replies, xml ) Need Help??


in reply to Date & Time system variables

this should do it
# 0 1 2 3 4 5 6 7 ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime(time);

Replies are listed 'Best First'.
RE: RE: Date & Time system variables
by infoninja (Friar) on Dec 30, 1999 at 11:14 UTC
    Can also use
    # 0 1 2 3 4 5 6 7 8 ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = (localtime)[0, +1,2,3,4,5,6,7,8];
    note that $mon is in the range 0..11, and $wday has the range 0..6 also, $year is returned as number of years since 1900 (currently a 2 digit number, but not a y2k problem)...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2024-04-24 12:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found