Re: Time::Local (how to handle bad input)

2013-01-09 Thread Bill Stephenson
On Jan 9, 2013, at 11:26 AM, Andy Bach wrote: > On Wed, Jan 9, 2013 at 10:11 AM, Bill Stephenson wrote: > >> date=11/01/2003 >> >> I want to trap bad data sent to time::local in a loop where I use these >> lines: >> >>my ($date_month, $date_day, $date_year) = split(/\//, >> $DOCUMENT-

Re: Time::Local (how to handle bad input)

2013-01-09 Thread Andy Bach
On Wed, Jan 9, 2013 at 10:11 AM, Bill Stephenson wrote: > date=11/01/2003 > > I want to trap bad data sent to time::local in a loop where I use these > lines: > > my ($date_month, $date_day, $date_year) = split(/\//, > $DOCUMENT->param("date")); > > $date_year = ($date_year-1900);

Re: Time::Local let me faint

2006-08-29 Thread John W. Krahn
Jeff Pang wrote: >>So if you want to translate 31 August 2006 you have to subtract one from the >>month and 1900 from the year: >> >>$ perl -Mstrict -MTime::Local -le 'print timelocal(0,0,0,31,7,106)' >>1157007600 > > John, > > For the instance described by you,both '2006' and '106' are right. >

Re: Time::Local let me faint

2006-08-29 Thread Jeff Pang
> >So if you want to translate 31 August 2006 you have to subtract one from the >month and 1900 from the year: > >$ perl -Mstrict -MTime::Local -le 'print timelocal(0,0,0,31,7,106)' >1157007600 John, For the instance described by you,both '2006' and '106' are right. $ perl -Mstrict -MTime::Loca

Re: Time::Local let me faint

2006-08-29 Thread John W. Krahn
Practical Perl wrote: > Hello,lists, Hello, > Please see these two lines' output: > > [$ perl -Mstrict -MTime::Local -le 'print timelocal(0,0,0,31,8,2006)' > Day '31' out of range 1..30 at -e line 1 > > $ perl -Mstrict -MTime::Local -le 'print timelocal(0,0,0,31,7,2006)' > 1156953600 > > > I

Re: Time::Local let me faint

2006-08-29 Thread Flemming Greve Skovengaard
Practical Perl wrote: Hello,lists, Please see these two lines' output: [$ perl -Mstrict -MTime::Local -le 'print timelocal(0,0,0,31,8,2006)' Day '31' out of range 1..30 at -e line 1 $ perl -Mstrict -MTime::Local -le 'print timelocal(0,0,0,31,7,2006)' 1156953600 I translate the time of '2006-

Re: Time::Local let me faint

2006-08-29 Thread Practical Perl
Thank you,:-) For the intuition I treated '8' as August in Time::Local's method...A low-level mistake. 2006/8/30, Lawrence Statton XE1/N1GAK <[EMAIL PROTECTED]>: Because SEPTEMBER only has thirty days. 0 - January; 1 - February; 2 - March; ... --L -- To unsubscribe, e-mail: [EMAIL PROTEC

Re: Time::Local let me faint

2006-08-29 Thread Adriano Ferreira
On 8/29/06, Practical Perl <[EMAIL PROTECTED]> wrote: But when I translate the time of '2006-8-31 00:00:00' to unix timestamp,it said '31 out of range'. I'm so faint that August doesn't have 31th day?Please tell me why this happen and how to resolve it. from "perldoc Time::Local" It is w

Re: Time::Local let me faint

2006-08-29 Thread Lawrence Statton XE1/N1GAK
Because SEPTEMBER only has thirty days. 0 - January; 1 - February; 2 - March; ... --L -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Time::Local

2005-12-15 Thread Shawn Corey
richard lavoie wrote: Hi dear list, I'm trying to write a little script for calculation with time like adding a few minutes to a certain time. I'm getting this message: Time::Local version 1134653954 required--this is only version 1.1 at /usr/lib/perl5/5.8.6/Exporter/Heavy.pm line 121. BEG