WordPress Get Post Time

// Retrieve the time at which the post was written.
get_the_time( string $format = '', int|WP_Post $post = null )
TheDutchScorpion