function get_comment_time( $d = '', $gmt = false, $translate = true ) {}

Retrieve the comment time of the current comment.


  • string $d: Optional. The format of the time (defaults to user’s config)
  • bool $gmt: Whether to use the GMT date
  • bool $translate: Whether to translate the time (for use in feeds)

Return values

returns:The formatted time

Defined filters

  • get_comment_time
    apply_filters('get_comment_time', $date, $d, $gmt, $translate)

Source code

function get_comment_time( $d = '', $gmt = false, $translate = true ) {

	global $comment;

	$comment_date = $gmt ? $comment->comment_date_gmt : $comment->comment_date;

	if ( '' == $d )

		$date = mysql2date(get_option('time_format'), $comment_date, $translate);


		$date = mysql2date($d, $comment_date, $translate);

	return apply_filters('get_comment_time', $date, $d, $gmt, $translate);



No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: