iso8601_to_datetime
iso8601_to_datetime ( $date_string, $timezone = 'user' )
Parameters:- (string) date_string Date and time in ISO 8601 format {@link}.
- (string) timezone Optional. If set to 'gmt' returns the result in UTC. Default 'user'.
Returns:- (string|false) The date and time in MySQL DateTime format - Y-m-d H:i:s, or false on failure.
Defined at: - Introduced in WordPress: 1.5.0
- Deprecated in WordPress: —
Description
Given an ISO 8601 (Ymd\TH:i:sO) date, returns a MySQL DateTime (Y-m-d H:i:s) format used by post_date[_gmt].