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:

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].

Related Functions

get_post_datetime, current_datetime, is_date, is_time, is_local_attachment

Top Google Results

User discussions

wpseek mobile