212 #------------------------------------------------ 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 , $year , $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