Is there a perl core module in 5.005 that would convert epoch seconds to printable datetime?
Our system has DateTime.pm, but the script in need of the functionality is still on Perl 5.005 and not feasible to upgrade it to 5.6+ (don’t ask. Just Cant Be Done for non-technical reasons). DateTime.pm – at least the version we have – requires 5.6.
Therefore I need one of the following:
-
Ideally, a module that is in Perl 5.005 core that would convert epoch seconds to date/time string. Preferably in YY/MM/DD hh:mm:ss format but not required.
-
Failing that, a 5.005-compatible non-XS module that would convert epoch seconds to date/time string. Preferably in YY/MM/DD hh:mm:ss format but not required.
Strong preference for a module that would have had this functionality on CPAN when Perl 5.005 was released (that way it is plausible it’d be in company’s existing set of CPAN modules)
According to CPAN the POSIX module is available. So you can use the
strftimefunction. This is what I use all the time in 5.8.8Gives