首页 WordPress函数大全 iso8601_to_datetime()

iso8601_to_datetime()

2020-05-02 / 5701阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

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

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

描述

参数

$date_string

(string)
(Required)
Date and time in ISO 8601 format https://en.wikipedia.org/wiki/ISO_8601.

$timezone

(string)
(Optional)
If set to 'gmt' returns the result in UTC.

Default value: 'user'

返回

(string|bool) The date and time in MySQL DateTime format - Y-m-d H:i:s, or false on failure.

大家谈论
    我的见解