iso8601_to_datetime


iso8601_to_datetime ( $date_string, $timezone = 'user' )

Parameters:
  • (string) $date_string Date and time in ISO 8601 format {@link https://en.wikipedia.org/wiki/ISO_8601}.
  • (string) $timezone Optional. If set to 'gmt' returns the result in UTC. Default 'user'.
Returns:
  • (string|bool) The date and time in MySQL DateTime format - Y-m-d H:i:s, or false on failure.
Defined at:

Description

Converts an iso8601 (Ymd\TH:i:sO) date to MySQL DateTime (Y-m-d H:i:s) format used by post_date[_gmt].

Related Functions

get_post_datetime, current_datetime, is_date, is_time, iso8601_timezone_to_offset

Top Google Results

User discussions

wpseek mobile