Category Archives: wordpress

Server Time Issues After Upgrading to WordPress 2.9.1

I posted this here because WordPress was giving me fits. I lost my RSS feeds, ATOM feeds and my post time was being set to UTC-0, which for anyone that knows anything about how the internet works, means that all of my posts were happening in the future.

In other words, lets say I post an article about the Chilean Earthquake at 8:00 am. Well my WordPress was putting the post time at 4:00 pm, eight hours before it happened.

This wreaks havoc with the Google sitemap and causes Google and all the other search engines to create “unreachable” reports to my articles until 4:00 pm when it can then see that the time stamp on the article has actually passed.

A real pain in my ass I must say. Anyway, I posted the work around below if any of you reading this are having the same problem. To all of my non geek readers, disregard this article. JD AKA Smartass

I ran into a problem that I have not seen mentioned anywhere online. When I initially upgraded to WP 2.9.1 and 2.9.2, I lost my server time synchronization. This also caused my RSS feeds to crash. I noticed that when updating my posts, I would check my XML Sitemaps Generator to make sure that the sitemap was updated and Google and the like were notified.

The time stamp was eight hours ahead to GMT, or Greenwich Mean Time. I live in Los Angeles California, and my servers are located in Spokane Washington. We are in the Pacific Time Zone of the United States, which is UTC-8.

I notified my webmaster of the issue and he assured me that the servers were set to the right time. After a day or so of picking about my site through an FTP client, I stumbled upon a file called WP-Settings.php.

In this file I found the following line,

if ( function_exists(‘date_default_timezone_set’) )
date_default_timezone_set(‘UTC’);

I immediately saw the problem. Although I had set the UTC time to “Los Angeles” in my “General Settings” located in the WordPress Dashboard, it was being disregarded because of the WP-Setting file was setting the time to straight UTC.

To remedy this problem, I changed the line to read as follows,

if ( function_exists(‘date_default_timezone_set’) )
date_default_timezone_set(‘UTC-8′);

The change being the addition of the “-8″ to the UTC parameter to suggest to WordPress to put my server time to PST.

I may be a dullard, but I have seen no mention of this anywhere on the internet with the exception of people like me Googling around looking for possible reasons as to why they had suddenly lost server time.

I hope this will help anyone like me struggling to understand all of this.

6 Comments

Filed under Breaking News, wordpress