Use the strftime function from POSIX.pm.
use POSIX 'strftime'; my $date = strftime '%Y/%m/%d %H:%M:%S', localtime $epoch;
p.s. I corrected your illogical US date format to something more sensible :)
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
In reply to Re: How can I convert epoch seconds to date format
by davorg
in thread How can I convert epoch seconds to date format
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |