Time::Local::timelocal is the inverse of localtime . The result will be in the local time of your host:
$ perl -MTime :: Local -le \
'print scalar localtime timelocal "00", "00", "00", "01", "01", "2000"'
Tue Feb 1 00:00:00 2000 Do you want gmtime match this localtime ?
$ perl -MTime :: Local '-le \
'print scalar gmtime timelocal "00", "00", "00", "01", "01", "2000"'
Mon Jan 31 23:00:00 2000 Do you want it to be the other way around, localtime , which matches this gmtime ?
$ perl -MTime :: Local -le \
'print scalar localtime timegm "00", "00", "00", "01", "01", "2000"'
Tue Feb 1 01:00:00 2000 Greg bacon
source share