wp_xmlrpc_server::_convert_date()protectedWP 1.0

Convert a WordPress date string to an IXR_Date object.

Метод класса: 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.

Code of wp_xmlrpc_server::_convert_date() WP 6.1.1

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 ) );
}