|XP is just a number|
|on Aug 24, 1999 at 22:41 UTC||Need Help??|
See the current Perl documentation for localtime.
Here is our local, out-dated (pre-5.6) version:
localtime - convert UNIX time into record or string using local time
Converts a time as returned by the time function to a 9-element array 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 array elements are numeric, and come straight out of a struct tm. In
particular this means that
If EXPR is omitted, uses the current time (localtime(time)).
In scalar context, returns the
$now_string = localtime; # e.g., "Thu Oct 13 04:54:34 1994"
This scalar value is not locale dependent, see the perllocale manpage, but instead a Perl builtin. Also see the
use POSIX qw(strftime); $now_string = strftime "%a %b %e %H:%M:%S %Y", localtime;
Note that the