jmccall has asked for the wisdom of the Perl Monks concerning the following question:
it ran just fine under perl 5.8 the error only started occuring when i tried to run it on 5.10 Thanks212 #------------------------------------------------ 213 sub ConvertMysqlTime { 214 my $self = shift; 215 my ( $date , $lpszToUnixStamp ) = @_; 216 217 my @arDateTime = split ( / / , $date ); 218 my @arDate = split ( /-/ , $arDateTime[ 0 ] ); 219 my @arTime = split ( /:/ , $arDateTime[ 1 ] ); 220 $arDate[ 1 ] =~ s/0^//g; 221 222 my $time = timelocal( $arTime[ 2 ] , $arTime[ 1 ] , $ +arTime[ 0 ] , $arDate[ 2 ] , $arDate[ 3 ] , $arDate[ 0 ] ) ; 223 if ( $lpszToUnixStamp eq "false" ) { 224 my ( $sec , $min , $hour , $mday , $month , $y +ear , $wDay , $yDay , $isdst ) = localtime($time); 225 226 $year += 1900; 227 $time = $self->GetWeekDay( $wDay , "Long" ) . +" " . $self->GetMonth( $month , "Long") . " $mday, $year"; 228 } 229 230 return $time; 231 } 232
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Time::Local issues
by JavaFan (Canon) on Oct 22, 2008 at 20:03 UTC | |
|
Re: Time::Local issues
by Illuminatus (Curate) on Oct 22, 2008 at 20:11 UTC | |
|
Re: Time::Local issues
by smiffy (Pilgrim) on Oct 23, 2008 at 04:37 UTC |