the_modified_time not correct
-
I’m working on a 10 years old self hosted WP install. I was looking into changing the published date into the modified data for all blog posts. In the templates, I replaced the code. Old one:
<time datetime="<?php the_time('c');?>"> <?php the_time('j F Y'); ?></time>
new one:
<time datetime="<?php the_modified_time('c');?>"><?php the_modified_time('j F Y'); ?>
Here’s where it got weird. Every post that was modified before 6 februari 2021 shows the date 6 februari 2021. Every post that got updated after 6 februari 2021 shows the correct date.
I double checked this. There are posts that haven’t been updated since 2014 or 2011, yet they show 6 februari 2021. I even went into phpMyAdmin and the post_modified field shows the correct date (not 6 februari 2021).
Does anyone have an idea what it causing this or how to fix this? I have some suspects:
- I’m using older php version: 7.2.34
- I’m using an old sql server (WP site diagnose says so)
- I vagely remember doing a database update, Yoast SEO did that for indexing purposes. It may have been around 6 februari? Can’t remember.
- The topic ‘the_modified_time not correct’ is closed to new replies.