Summery Summery
Checks the post_date_gmt or modified_gmt and prepare any post or modified date for single post output.
Syntax Syntax
Parameters Parameters
- $date_gmt
-
(Required) GMT publication time.
- $date
-
(Optional) Local publication time.
Default value: null
Return Return
(string|null) ISO8601/RFC3339 formatted datetime, otherwise null.
Source Source
File: wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php
if ( isset( $date ) ) {
return mysql_to_rfc3339( $date );
}
return mysql_to_rfc3339( $date_gmt );
}
/**
* Retrieves the revision's schema, conforming to JSON Schema.
*
Advertisement
Changelog Changelog
| Version | Description |
|---|---|
| 4.7.0 | Introduced. |