in reply to Strage result using localtime to convert epoch time
You're using Time::localtime, which replaces the build-in localtime() function with one that returns a Time::tm object.
To fix the issue, don't use Time::localtime.
In Section
Seekers of Perl Wisdom