When converting DMYHMS to Epoch Seconds and back I get cheated out of a day.
Why?
Bill
--
#!/usr/bin/perl
use strict;
use warnings;
use Time::Local;
my ($time, $month, $day, $year, $seconds, $minutes, $hours, $wday, $yday,
$isdst);
my $start_date = '11/30/2012';
print $start_date \n;
Message-
From: Bill Stephenson bi...@ezinvoice.com
Sent: Friday, January 18, 2013 3:13pm
To: Perl Beginners beginners@perl.org
Subject: converting dates to epoch seconds and back
When converting DMYHMS to Epoch Seconds and back I get cheated out of a day.
Why?
Bill
--
#!/usr/bin/perl
use
The output depends on the timezone that you have set on your machine. You can
toy around and try different ones with
$ENV{TZ} = 'Europe/Vienna'; or
$ENV{TZ} = 'America/Los_Angeles';
If you don't want to depend on the timezone use gmtime instead of localtime.
Bill Stephenson bi...@ezinvoice.com
Bill Stephenson wrote:
When converting DMYHMS to Epoch Seconds and back I get cheated out of a day.
Why?
Bill
--
#!/usr/bin/perl
use strict;
use warnings;
use Time::Local;
my ($time, $month, $day, $year, $seconds, $minutes, $hours, $wday, $yday,
$isdst);
my $start_date = '11/30/2012';