Index: src/wp-includes/general-template.php
===================================================================
--- src/wp-includes/general-template.php	(revision 42789)
+++ src/wp-includes/general-template.php	(working copy)
@@ -2395,19 +2395,32 @@
  *
  * @since 0.71
  *
- * @param string $d Either 'G', 'U', or php date format.
+ * @param string $d      Either 'G', 'U', or php date format.
+ * @param bool   $gmt    Optional. Whether to retrieve the GMT time. Default false.
  */
-function the_time( $d = '' ) {
+function the_time( $d = '', $gmt = false ) {
+	$post = get_post( $post );
+
+	if ( ! $post ) {
+		return false;
+	}
+
+	if ( '' == $d ) {
+		$the_time = get_post_time( get_option( 'time_format' ), $gmt, $post, true );
+	} else {
+		$the_time = get_post_time( $d, $gmt, $post, true );
+	}
+
 	/**
 	 * Filters the time a post was written for display.
 	 *
 	 * @since 0.71
 	 *
-	 * @param string $get_the_time The formatted time.
-	 * @param string $d            The time format. Accepts 'G', 'U',
-	 *                             or php date format.
+	 * @param string $the_time    The formatted time.
+	 * @param string $d           The time format. Accepts 'G', 'U',
+	 *                            or php date format.
 	 */
-	echo apply_filters( 'the_time', get_the_time( $d ), $d );
+	echo apply_filters( 'the_time', $the_time, $d );
 }
 
 /**
