You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
725 B
Perl

The gmtime function converts a time value into an array of nine elements.
You can extract each of the elements with code like the following:
($sec, $min, $hour, $dom, $mon,$year, $wday, $yday, $isdst) = gmtime($time);
Array Values Returned by gmtime Functions
Value Holds
$sec Seconds after the minute, from 0 to 59.
$min Minutes after the hour, from 0 to 59.
$hour Hour of day, from 0 to 23.
$dom Day of month, from 1 to 31.
$mon Month of year, from 0 to 11.
$year Years since 1900.
$wday Days since Sunday, from 0 to 6.
$yday Days since January 1, from 0 to 365.
$isdst Daylight-savings time; > 0 if in effect, 0 if not, < 0 if Perl can't tell.