- 论坛徽章:
- 145
|
回复 1# bzhao
$ perldoc -f localtime
localtime EXPR
localtime
Converts a time as returned by the time function to a 9-element
list with the time analyzed for the local time zone. Typically
used as follows:
# 0 1 2 3 4 5 6 7 8
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime(time);
All list elements are numeric and come straight out of the C
`struct tm'. $sec, $min, and $hour are the seconds, minutes, and
hours of the specified time.
...
In scalar context, "localtime()" returns the ctime(3) value:
$now_string = localtime; # e.g., "Thu Oct 13 04:54:34 1994"
This scalar value is not locale-dependent but is a Perl builtin.
...
|
|