Core Function
View Source on Trac ↗ get_gmt_from_date()
get_gmt_from_date( mixed $date_string, mixed $format = 'Y-m-d H:i:s' ) Given a date in the timezone of the site, returns that date in UTC.
Parameters 1 required
| Name / Type | Description |
|---|---|
| $date_string string | The date to be converted, in the timezone of the site. 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 UTC.
Function Information
Since Version
1.2.0
Source File
wp-includes/formatting.php
Advertisement