HTTP/2 301
server: nginx
date: Sat, 27 Dec 2025 04:38:37 GMT
content-type: text/html; charset=UTF-8
x-olaf: ⛄
vary: accept, content-type
x-redirect-by: WordPress
location: https://developer.wordpress.org/reference/functions/comment_time/
x-frame-options: SAMEORIGIN
alt-svc: h3=":443"; ma=86400
x-nc: MISS ord 1
HTTP/2 200
server: nginx
date: Sat, 27 Dec 2025 04:38:37 GMT
content-type: text/html; charset=UTF-8
vary: Accept-Encoding
x-olaf: ⛄
vary: accept, content-type
link:
; rel="https://api.w.org/"
link:
; rel="alternate"; title="JSON"; type="application/json"
link: ; rel=shortlink
x-frame-options: SAMEORIGIN
content-encoding: gzip
alt-svc: h3=":443"; ma=86400
x-nc: MISS ord 1
comment_time() – Function | Developer.WordPress.org
comment_time( string $format = '', int|WP_Comment $comment_id )
Displays the comment time of the current comment.
$formatstringoptionalPHP time format. Defaults to the 'time_format' option.
Default:''
$comment_idint|optionalWP_Comment or ID of the comment for which to print the time.
Default current comment.
| Version | Description |
|---|
| 6.2.0 | Added the $comment_id parameter. |
| 0.71 | Introduced. |
Basic Example
Displays the current comment time in the format “22:04:11”.