($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime(time);
All array elements are numeric, and come straight out of a struct tm. In
particular this means that $mon
has the range 0..11 and
$wday
has the range 0..6. Also, $year
is the
number of years since 1900, not
simply the last two digits of the year.
If
EXPR is omitted, does gmtime(time)
.
In a scalar context, prints out the ctime
value:
$now_string = gmtime; # e.g., "Thu Oct 13 04:54:34 1994"
Also see the timegm.pl library, and the strftime
function available via the
POSIX module.