Core Function
View Source on Trac ↗ rest_get_date_with_gmt()
rest_get_date_with_gmt( mixed $date, mixed $is_utc = false ) Parses a date into both its local and UTC equivalent, in MySQL datetime format.
Parameters 1 required
| Name / Type | Description |
|---|---|
| $date string | RFC3339 timestamp. Required |
| $is_utc bool | Whether the provided date should be interpreted as UTC. Default false. |
Return Value
((array)
(array | null) {
Local and UTC datetime strings, in MySQL datetime format (Y-m-d H:i:s),
null on failure.
Function Information
Since Version
4.4.0
Source File
wp-includes/rest-api.php
Advertisement