Incorrect modified dates
-
Hello,
First, I very much like and enjoy this plugin, it works well.
For my issue, however, I’ve been seeing incorrect modified dates, sometimes they were all the same time, just wrong, and I even had one that was modified in the year 4007. I enabled PHP Error Reporting, and saw this: http://prntscr.com/j4gofp
Looking at the code, I fixed it with this (..includes/admin-screens.php:308):
if (version_compare($wp_version, '4.6', '>=')) { $m_time = get_the_modified_time('Y\/m\/d g\:i\:s a', $post_id); } else { $m_time = get_the_modified_time('U', $post_id); } $dtime = DateTime::createFromFormat("Y\/m\/d g\:i\:s a", $m_time); $timestamp = $dtime->getTimestamp(); $time_diff = time() - $timestamp;Result: http://prntscr.com/j4gsza
For reference, I’m using WordPress 4.9.5, PHP version 7.2.3.
Thanks,
Tony.- This topic was modified 7 years, 11 months ago by .
- This topic was modified 7 years, 11 months ago by .
The page I need help with: [log in to see the link]
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
The topic ‘Incorrect modified dates’ is closed to new replies.