Core Function
View Source on Trac ↗ get_date_from_gmt()
get_date_from_gmt( mixed $date_string, mixed $format = 'Y-m-d H:i:s' ) Given a date in UTC or GMT timezone, returns that date in the timezone of the site.
Parameters 1 required
| Name / Type | Description |
|---|---|
| $date_string string | The date to be converted, in UTC or GMT timezone. Required |
| $format string | The format string for the returned date. Default 'Y-m-d H:i:s'. |
Return Value
(string)
Formatted version of the date, in the site's timezone.
Function Information
Since Version
1.2.0
Source File
wp-includes/formatting.php
Advertisement