Title: get_comment_time
Published: April 25, 2014
Last modified: February 24, 2026

---

# apply_filters( ‘get_comment_time’, string|int $comment_time, string $format, bool $gmt, bool $translate, WP_Comment $comment )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/get_comment_time/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/get_comment_time/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/get_comment_time/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/get_comment_time/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/get_comment_time/?output_format=md#wp--skip-link--target)

Filters the returned comment time.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/get_comment_time/?output_format=md#parameters)󠁿

 `$comment_time`string|int

The comment time, formatted as a date string or Unix timestamp.

`$format`string

PHP date format.

`$gmt`bool

Whether the GMT date is in use.

`$translate`bool

Whether the time is translated.

`$comment`[WP_Comment](https://developer.wordpress.org/reference/classes/wp_comment/)

The comment object.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/get_comment_time/?output_format=md#source)󠁿

    ```php
    return apply_filters( 'get_comment_time', $comment_time, $format, $gmt, $translate, $comment );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/comment-template.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/comment-template.php#L1131)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/comment-template.php#L1131-L1131)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/get_comment_time/?output_format=md#related)󠁿

| Used by | Description | 
| [get_comment_time()](https://developer.wordpress.org/reference/functions/get_comment_time/)`wp-includes/comment-template.php` |

Retrieves the comment time of the current comment.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/get_comment_time/?output_format=md#changelog)󠁿

| Version | Description | 
| [1.5.0](https://developer.wordpress.org/reference/since/1.5.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fget_comment_time%2F)
before being able to contribute a note or feedback.