- or download this
$ENV{'TZ'} = 'America/Los_Angeles';
my $epoch = timelocal(42,07,10,19,05,2017);
print "timelocal epoch: $epoch\n";
print "timelocal date: ", scalar localtime($epoch), "\n";
- or download this
timelocal epoch: 1497892062
timelocal date: Mon Jun 19 10:07:42 2017
- or download this
#!/usr/bin/env perl
...
"T::P gmt strftime: ", $gmt->strftime, "\n",
"T::P local strftime: ", $local->strftime, "\n"
;
- or download this
gmt epoch: 1497866862
local epoch: 1497866862
datestr: 2017-06-19 10:07:42
T::P gmt strftime: Mon, 19 Jun 2017 10:07:42 UTC
T::P local strftime: Mon, 19 Jun 2017 03:07:42 PDT