They are, very similar but with some nuances:
function get_the_date( $d = '' ) {
global $post;
$the_date="";
if ( '' == $d )
$the_date .= mysql2date(get_option('date_format'), $post->post_date);
else
$the_date .= mysql2date($d, $post->post_date);
return apply_filters('get_the_date', $the_date, $d);
}
function get_the_time( $d = '', $post = null ) {
$post = get_post($post);
if ( '' == $d )
$the_time = get_post_time(get_option('time_format'), false, $post, true);
else
$the_time = get_post_time($d, false, $post, true);
return apply_filters('get_the_time', $the_time, $d, $post);
}
-
get_the_date()
always works for current global$post
,get_the_time()
allows you to specify post as argument. -
They default to different formats, stored in
date_format
andtime_format
options respectively. -
They pass output through different filters
get_the_date
andget_the_time
plus lower levelget_post_time
respectively.