Distill blog posts display different/wrong dates compared to listing page

Hi All! I'm getting to know Distill, and it's great! Having created (simple) RMarkdown and blogdown websites in the past, I'm very excited for the possibilities here. But –

I'm having an issue with Distill blogs, and not sure if it's a bug or my misunderstanding of a feature. The behavior I'll describe I also see on many other distill blogs, including those linked from https://pkgs.rstudio.com/distill/articles/examples.html.

When I create a new blog post Rmd, knit, and rebuild the site, the date written in the Rmd's YAML is correctly displayed on the listing page. But, the date is incorrectly displayed on the actual blog post: it is dated as the day before the date in the YAML and on the listing page. So on the listing page, when you click on a post, the date displayed will be the wrong date: the (correct) date in the URL does not match the (incorrect) date displayed on that post.

Here is my simple blog here: https://github.com/openscapes/events.

Thanks for any help/understanding!

I can't see that on your blog. Can you link to a post that has the incorrect date ?

Hi Christophe, yes: of course:

It shows up when the site is built:

On the listing page the date is March 8: https://openscapes.github.io/events/

And on that post's page the date is (incorrectly) March 7: https://openscapes.github.io/events/posts/2021-03-08-dr-dawn-wright-interview/. Note that this post's url slug is March 8, which is the correct date, displayed on the listing page.

There are more examples of this on the blogs linked from the distill packagedown page, one is themockup.blog.

Thanks for your help!

I see the same date:

What am I missing something ?
Thanks for your patience explaining me !

Hi Christophe,

That is so fascinating! I've tried Firefox, Chrome, and Safari, and all show the following:

Another example:

and (I can only do one image per post):

Thanks for your patience, I didn't know we weren't seeing the same thing!

This is indeed fascinating !

I see the correct date for https://blogs.rstudio.com/ai/posts/2021-02-11-tabnet/ and https://themockup.blog/posts/2021-01-28-removing-image-backgrounds-with-magick/

@tom_rstudio an idea on this one ? :thinking:

I have an additional reprex of this, when changing the date of a post it will correctly adjust the "slug" but will do the date - 1 for the actual displayed date for the article.

@juliesquid lets rule out a browser cache issue. Can you try a hard refresh on these website ?

But why can't I see the same as you on those published blog posts ?
The capture we shared shows clearly a difference. I am bit puzzled here.

Thanks Christophe – I've done the hard refresh on Firefox, Chrome, and Safari and the dates still mis-match :frowning:

I definitely see the March 7 vs March 8 on the blog live right now.

So could it be an issue with timezone ? because I am in France and so I see the date not the same as you ?

Interesting Tom and Christophe.

Tom's gif shows this happening locally when he modifies the date after the slug is created, but that wouldn't be a timezone issue. Since that gif isn't displaying here and something is going on, shall I post an issue on https://github.com/rstudio/distill?

yes you can open an issue. I'll try to reproduce locally. But I can't explain why I don't see the same date for an online website while we look at the same page just from different place in the world

I really think this is a timezone issue. The code source of your page contains :

<script id="distill-front-matter" type="text/json">
{"title":"Interview with Dr. Dawn Wright","description":"Interview with Dr. Dawn Wright at MozFest","authors":[{"author":"Julie Lowndes & Erin Robinson","authorURL":"#","affiliation":"&nbsp;","affiliationURL":"#","orcidID":""}],"publishedDate":"2021-03-08T00:00:00.000+00:00","citationText":"Robinson, 2021"}
</script>

Which is the data process by the JS from distill library. As you see the date contains the timezone part.

So for me translated in CET it not the same day as for you I think. I'll look more closely into that tomorrow. Please open the issue in distill repo so we fix this.

1 Like

Ah, very interesting. I'll include this in the github issue.

I appreciate your time on this, thanks!

For reference, the issue to continue this : https://github.com/rstudio/distill/issues/315

I also see this on my blog and was wondering if it was a time zone issue because it seems not to happen for every post.

1 Like