• Resolved rhadts1

    (@rhadts1)


    I ran into a problem that I have not seen mentioned here. When I initially upgraded to WP 2.9.1 and 2.9.2, I lost my server time synchronization. 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. 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 web host 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 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.

    Regards,

    John De Gennaro

Viewing 1 replies (of 1 total)
  • Glad I found your post. It’s the same in 3.0.1. So apparently they don’t see this as a bug. But I think maybe where the error lies is in the XML Sitemap Generator plugin (which is where I discovered the same as you did). It probably uses the default time set in wp-settings.php instead of the default time set in the actual WP Settings page.

    Can anyone shed some light on this issue?

Viewing 1 replies (of 1 total)
  • The topic ‘Server Time Issues in WP 2.9.2’ is closed to new replies.