wp_xmlrpc_server::_convert_date()protectedWP 1.0

Converts a WordPress date string to an IXR_Date object.

Method of the class: wp_xmlrpc_server{}

No Hooks.

Return

IXR_Date. IXR_Date object.

Usage

// protected - for code of main (parent) or child class
$result = $this->_convert_date( $date );
$date(string) (required)
Date string to convert.

wp_xmlrpc_server::_convert_date() code WP 6.6.2

protected function _convert_date( $date ) {
	if ( '0000-00-00 00:00:00' === $date ) {
		return new IXR_Date( '00000000T00:00:00Z' );
	}
	return new IXR_Date( mysql2date( 'Ymd\TH:i:s', $date, false ) );
}