in reply to DateTime normalize

I suggest that you use POSIX::strftime function which uses less coding.

my $now = POSIX::strftime("%Y-%m-%d %H:%M:%S", localtime);