From 63aab770eb66a1e1fff8e21c271ec02f886abd25 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 26 Jun 2018 17:52:58 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@43383 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/functions.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index 3b8ed27b20..c94096e4c0 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -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 * 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 * * @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 ) { $formatted = mysql2date( 'c', $date_string, false );