首页 WordPress函数大全 get_gmt_from_date()

get_gmt_from_date()

2020-05-01 / 5971阅 / 悠然

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

get_gmt_from_date( string $string, string $format = 'Y-m-d H:i:s' )

Given a date in the timezone of the site, returns that date in UTC timezone.

描述

Requires and returns a date in the Y-m-d H:i:s format. Return format can be overridden using the $format parameter.

参数

$string

(string)
(Required)
The date to be converted, in the timezone of the site.

$format

(string)
(Optional)
The format string for the returned date.

Default value: 'Y-m-d H:i:s'

返回

(string) Formatted version of the date, in UTC timezone.

大家谈论
    我的见解