Docs: Correct description for `mysql_to_rfc3339()`.
Despite historical function name, the output does not conform to RFC3339 format, which must contain timezone. Props Rarst. See #42542. Built from https://develop.svn.wordpress.org/trunk@43383 git-svn-id: http://core.svn.wordpress.org/trunk@43211 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
76c25aa14b
commit
67716d1367
|
@ -5849,15 +5849,18 @@ function wp_post_preview_js() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parses and formats a MySQL datetime (Y-m-d H:i:s) for ISO8601/RFC3339.
|
* Parses and formats a MySQL datetime (Y-m-d H:i:s) for ISO8601 (Y-m-d\TH:i:s).
|
||||||
*
|
*
|
||||||
* Explicitly strips timezones, as datetimes are not saved with any timezone
|
* Explicitly strips timezones, as datetimes are not saved with any timezone
|
||||||
* information. Including any information on the offset could be misleading.
|
* information. Including any information on the offset could be misleading.
|
||||||
*
|
*
|
||||||
|
* Despite historical function name, the output does not conform to RFC3339 format,
|
||||||
|
* which must contain timezone.
|
||||||
|
*
|
||||||
* @since 4.4.0
|
* @since 4.4.0
|
||||||
*
|
*
|
||||||
* @param string $date_string Date string to parse and format.
|
* @param string $date_string Date string to parse and format.
|
||||||
* @return string Date formatted for ISO8601/RFC3339.
|
* @return string Date formatted for ISO8601 without time zone.
|
||||||
*/
|
*/
|
||||||
function mysql_to_rfc3339( $date_string ) {
|
function mysql_to_rfc3339( $date_string ) {
|
||||||
$formatted = mysql2date( 'c', $date_string, false );
|
$formatted = mysql2date( 'c', $date_string, false );
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.0-alpha-43382';
|
$wp_version = '5.0-alpha-43383';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue