Uses
Uses | Description |
---|---|
wp-includes/functions.php: mysql2date() | Convert given MySQL date string into a different format. |
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.
(string) (Required) Date string to parse and format.
(string) Date formatted for ISO8601 without time zone.
File: wp-includes/functions.php
function mysql_to_rfc3339( $date_string ) { return mysql2date( 'Y-m-d\TH:i:s', $date_string, false ); }
Version | Description |
---|---|
4.4.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/mysql_to_rfc3339