the_time

Display the time at which the post was written.

Description

the_time( (string) $d = '' ); 

Parameters (1)

0. $d — Optional. (string) => ''
Either G,, U, or php date format.

Usage

  1. if ( !function_exists( 'the_time' ) ) { 
  2. require_once ABSPATH . WPINC . '/general-template.php'; 
  3.  
  4. // Either 'G', 'U', or php date format. 
  5. $d = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = the_time($d); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/general-template.php  
  1. function the_time( $d = '' ) { 
  2. /** 
  3. * Filters the time a post was written for display. 
  4. * @since 0.71 
  5. * @param string $get_the_time The formatted time. 
  6. * @param string $d The time format. Accepts 'G', 'U',  
  7. * or php date format. 
  8. */ 
  9. echo apply_filters( 'the_time', get_the_time( $d ), $d );