use POSIX; print strftime("%Y/%m/%d %H:%M:%S", localtime),"\n"; #### use POSIX; print strftime("%A, %B %d, %Y", localtime($epoch)),"\n";