We are processing data from an API that is returning date/time values of the following form:
1061943540000
When I used the tool on this page it converts the value to the following correct date:
Tue Aug 26 2003 17:19:00 GMT-0700 (PDT)
We are using the following Perl code to convert the date/time in our script:
use DateTime;
my $dt = DateTime->from_epoch(epoch => $time);
However, this is producing the following output which is incorrect:
1969-12-31 23:59:59
I'm totally confused why this isn't working and would appreciate someone explaining what I'm doing wrong and what code I should be using to convert it correctly. Thanks in advance!