converting dates to epoch seconds and back

2013-01-18 Thread Bill Stephenson
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;

RE: converting dates to epoch seconds and back

2013-01-18 Thread twlewis
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

Re: converting dates to epoch seconds and back

2013-01-18 Thread Dominik Danter
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

Re: converting dates to epoch seconds and back

2013-01-18 Thread John W. Krahn
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';