in reply to Epoch to Mysql datetime format - DO NOT USE

Your code could be rewritten as:

use POSIX qw( strftime ); sub getMysqlTime { return POSIX::strftime("%Y-%m-%d %H:%M:%S", gmtime(shift)); }
There is also Time::Piece::MySQL that does the same.

Ciao, Valerio