Parses and formats a MySQL datetime (Y-m-d H:i:s) for ISO8601 (Y-m-d\TH:i:s).
Description
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.
Parameters
$date_stringstring
Date string to parse and format.
Return
string
Date formatted for ISO8601 without time zone.
Uses · 1
mysql2date()Converts given MySQL date string into a different format.
Signature, return type and hooks compared across 5 parsed releases.
About this page
Parsed data
Generated from the wordpress-develop 7.0.4 tag, from src/wp-includes/functions.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.