首页 WordPress函数大全 get_date_from_gmt()

get_date_from_gmt()

2020-05-01 / 2271阅 / 悠然

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

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

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

描述

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 UTC timezone.

$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 the site's timezone.

大家谈论
    我的见解