# Panel Hook Modified

**URL:** <https://forum.getkirby.com/t/panel-hook-modified/23099>\
**Category:** Questions\
**Tags:** v3\
**Created:** [August 10, 2021, 9:17am UTC](https://forum.getkirby.com/t/panel-hook-modified/23099 "2021-08-10T09:17:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MinmlCo](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/minmlco/32/3493_2.png) [@MinmlCo](https://forum.getkirby.com/u/MinmlCo)\
**Post date:** [August 10, 2021, 9:17am UTC](https://forum.getkirby.com/t/panel-hook-modified/23099/1 "2021-08-10T09:17:51Z")

</div>

Hey all, a question

When using the page.update:after hook in a plugin like the below snippet, should the $oldPage and $newPage modified dates be different? I assumed it would return the previous modified date and then the current modified date?

Thanks!

```auto

     return [
         'hooks' => [
              'page.update:after' => function ($newPage, $oldPage) {
                      'oldPageModified' => $oldPage->modified('%d.%m.%Y %H:%M:%S'),
                      'newPageModified' => $newPage->modified('%d.%m.%Y %H:%M:%S'),
               }
         ]
     ]

```

---

<div class="post-metadata">

**Author:** ![pixelijn](https://avatars.discourse-cdn.com/v4/letter/p/7ab992/32.png) [@pixelijn](https://forum.getkirby.com/u/pixelijn)\
**Post date:** [August 10, 2021, 9:42am UTC](https://forum.getkirby.com/t/panel-hook-modified/23099/2 "2021-08-10T09:42:24Z")

</div>

`$page->modified()` actually reads the content file modification date, and that date will then be the same for both the `$oldPage` and `$newPage`. You can only fetch properties from `$oldPage` that belong to that object.
