public function validTimeStr ( $time ) {
        if ($time === '0000-00-00 00:00:00') {
            return true;
        }

        if ($this->fitNonExistingDates && $this->isNonExistingTimeString( $time )) {
            $time = $this->getPossibleDateString( $time );
        }

        return (is_string( $time ) && strlen( $time ) == 19 && $time == date( 'Y-m-d H:i:s',
                                                                              strtotime( $time ) ));
    }
public function validTimeStr ( $time ) {
        if ($time === '0000-00-00 00:00:00') {
            return true;
        }

        if ($this->fitNonExistingDates && $this->isNonExistingTimeString( $time )) {
            $time = $this->getPossibleDateString( $time );
        }

        return (is_string( $time ) && strlen( $time ) == 19 && $time == date( 'Y-m-d H:i:s',
                                                                              strtotime( $time ) ));
    }
public function validTimeStr ( $ time ) { if ( $ time === '0000-00-00 00:00:00' ) { return true ; } if ( $ this -> fitNonExistingDates && $ this -> isNonExistingTimeString ( $ time ) ) { $ time = $ this -> getPossibleDateString ( $ time ) ; } return ( is_string ( $ time ) && strlen ( $ time ) == 19 && $ time == date ( 'Y-m-d H:i:s' , strtotime ( $ time ) ) ) ; }
validate an string ... only valid datestring will pass
@param string $time formated for Y-m-d H:i:s
@return boolan
validate an string ... only valid datestring will pass