get_the_time
get_the_time ( $format = '', $post = null )
Parameters:- (string) format Optional. Format to use for retrieving the time the post was written. Accepts 'G', 'U', or PHP date format. Defaults to the 'time_format' option.
- (int|WP_Post) post Post ID or post object. Default is global `$post` object.
Returns:- (string|int|false) Formatted date string or Unix timestamp if `$format` is 'U' or 'G'. False on failure.
Defined at: - Introduced in WordPress: 1.5.0
- Deprecated in WordPress: —
Description
Retrieves the time at which the post was written.