my ($sec, $mi, $h, $dm, $mo, $y) = localtime(time); my $DATE = sprintf "%4s-%02s-%02s %02s:%02s", $y + 1900, $mo + 1, $dm, $h, $mi;
use POSIX qw(strftime); print strftime "%Y-%m-%d %T\n", localtime; print strftime "%Y-%m-%d-%H-%M-%S\n", localtime;