use POSIX 'strftime'; print strftime '%Y-%m-%d %H:%M:%S', gmtime time - (5 * 3600);