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

---

# apply_filters( ‘get_post_modified_time’, string|int $time, string $format, bool $gmt )

## In this article

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

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

Filters the localized time a post was last modified.

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

 `$time`string|int

Formatted date string or Unix timestamp if `$format` is `'U'` or `'G'`.

`$format`string

Format to use for retrieving the time the post was modified.
 Accepts `'G'`, `'U'`,
or PHP date format. Default `'U'`.

`$gmt`bool

Whether to retrieve the GMT time. Default false.

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

    ```php
    return apply_filters( 'get_post_modified_time', $time, $format, $gmt );
    ```

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

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

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

Retrieves the time at which the post was last modified.

  |

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

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

## User Contributed Notes

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