in reply to Convert epoch seconds to date
That's what the localtime function does. Pass it a number of epoch seconds and it'll return an array of values that you can use to build a human-readable date.
Or, even easier, use localtime in conjunction with the POSIX::strftime function.
--use POSIX 'strftime'; my $epoch = 985015768; print strftime('%d/%m/%Y', localtime($epoch));
"Perl makes the fun jobs fun
and the boring jobs bearable" - me
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Convert epoch seconds to date
by rockslammer (Initiate) on Sep 22, 2004 at 18:49 UTC |