rest_parse_date
rest_parse_date ( $date, $force_utc = false )
Parameters:- (string) date RFC3339 timestamp.
- (bool) force_utc Optional. Whether to force UTC timezone instead of using the timestamp's timezone. Default false.
Returns:- (int|false) Unix timestamp on success, false on failure.
Defined at: - Introduced in WordPress: 4.4.0
- Deprecated in WordPress: —
Description
Parses an RFC3339 time into a Unix timestamp.Explicitly check for `false` to detect failure, as zero is a valid return
value on success.