# Incorrect page.date in Jekyll 4

**URL:** <https://talk.jekyllrb.com/t/incorrect-page-date-in-jekyll-4/8228>\
**Category:** Help\
**Created:** [May 8, 2023, 6:31pm UTC](https://talk.jekyllrb.com/t/incorrect-page-date-in-jekyll-4/8228 "2023-05-08T18:31:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidgiven](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/davidgiven/32/532_2.png) [@davidgiven](https://talk.jekyllrb.com/u/davidgiven)\
**Post date:** [May 8, 2023, 6:31pm UTC](https://talk.jekyllrb.com/t/incorrect-page-date-in-jekyll-4/8228/1 "2023-05-08T18:31:43Z")

</div>

I have a page with a name like this:

`_pages/2017-05-28-glarnisch-walk/index.md`

There’s no date field defined in the front matter, but with Jekyll 3.9.0 the date is parsed out of the filename; I’m then displaying this via my layout.

```auto
      <time class="date" datetime="{{ page.date }}">
          {{ page.date | date: "%Y %B %d" }}
      </time>

```

```auto
      <time class="date" datetime="2017-05-28 00:00:00 +0200">
          2017 May 28
      </time>

```

My collection is defined as follows:

```auto
collections:
  pages:
    permalink: /:path:output_ext
    output: true

```

However, if I upgrade to Jekyll 4.3.1, this no longer works — the date is never set and is set to the current time.

I’m guessing that the default behaviour has changed somewhere along the line; I’ve tried to find something in the release notes but don’t see anything. Is this change intentional or does it point to something I could be doing wrong at my end? If the former, can it be reenabled?

---

<div class="post-metadata">

**Author:** ![bewuethr](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/bewuethr/32/4611_2.png) [@bewuethr](https://talk.jekyllrb.com/u/bewuethr)\
**Post date:** [May 14, 2023, 11:33pm UTC](https://talk.jekyllrb.com/t/incorrect-page-date-in-jekyll-4/8228/2 "2023-05-14T23:33:05Z")

</div>

Shoudln’t the path to the page be `_pages/2017-05-28-glarnisch-walk.md`? Why is it in a subdirectory?

---

<div class="post-metadata">

**Author:** ![davidgiven](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/davidgiven/32/532_2.png) [@davidgiven](https://talk.jekyllrb.com/u/davidgiven)\
**Post date:** [May 15, 2023, 9:25am UTC](https://talk.jekyllrb.com/t/incorrect-page-date-in-jekyll-4/8228/3 "2023-05-15T09:25:35Z")

</div>

It’s in a subdirectory so that each pages’ resources is isolated from the others. Is that no longer supported?

---

<div class="post-metadata">

**Author:** ![bewuethr](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/bewuethr/32/4611_2.png) [@bewuethr](https://talk.jekyllrb.com/u/bewuethr)\
**Post date:** [May 15, 2023, 2:02pm UTC](https://talk.jekyllrb.com/t/incorrect-page-date-in-jekyll-4/8228/4 "2023-05-15T14:02:22Z")

</div>

Oh, it is! I wasn’t aware of that. From which Jekyll version did you upgrade to 4.3.1? Maybe the release notes between the two versions contain a hint.

I can reproduce your problem with a basic Minima blog and Jekyll 4.3.2.

---

<div class="post-metadata">

**Author:** ![davidgiven](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/davidgiven/32/532_2.png) [@davidgiven](https://talk.jekyllrb.com/u/davidgiven)\
**Post date:** [May 15, 2023, 3:05pm UTC](https://talk.jekyllrb.com/t/incorrect-page-date-in-jekyll-4/8228/5 "2023-05-15T15:05:57Z")

</div>

I was using 3.9.0, I believe — while I don’t have a record of which specific version it was, I upgraded and downgraded several times while I was figuring out what was wrong, and I was using the most recent v3 on Debian.
