Categories

WordPress date problem fixed

I have some posts here with pretty ancient dates. A recent upgrade of WordPress introduced a problem with pre-1970 dates, which started to show as today’s date.

An appeal on the WordPress forums produced no solution, and I had assumed that I would just have to put up with it, because very few bloggers write posts with dates in the 1960′s.

But today I did another search for a solution and discovered this thread.

All I had to do was find the file

wp-includes/functions.php

and comment out this code:

// Sanity check for PHP 5.1.0-
if ( false === $i || intval($i) < 0 ) {
if ( ! $gmt )
$i = current_time( 'timestamp' );
else
$i = time();
// we should not let date() interfere with our
// specially computed timestamp
$gmt = true;
}

Thanks to gosunatxrea for providing a solution.

You must be logged in to post a comment.