WordPress.org

Ready to get started?Download WordPress

Forums

WordPress 2.9.1 ignoring local time zone? (8 posts)

  1. pnaw10
    Member
    Posted 4 years ago #

    Just upgraded CNYRadio.com to WP 2.9.1 today. On the Settings/General page, my time zone settings appear fine:

    UTC time is 2010-01-15 1:11:05 Local time is 2010-01-14 20:11:05

    However, on the front page of the site, the "Latest CNYRadio.com Headlines" image is advertising that it's already Friday. I have a script in my header.php that's never failed before -- it uses the "w" PHP date attribute to determine the day of the week and output the appropriate graphical banner. (Right now, the only "custom" one is on Fridays.)

    Making the problem all the more puzzling: I have a post that's set to publish at 12:00 midnight Friday, but it's not appearing yet.

    So, to sum things up... for whatever reason, the script loading the banner image thinks today's Friday, but the WordPress loop knows it's still Thursday.

    Any ideas? Don't recall having this problem before I upgraded to 2.9.1.

  2. @mercime
    Volunteer Moderator
    Posted 4 years ago #

    Try this: In Settings > General - Timezone, choose UTC time instead of choosing a city time. That solved the problem for me in WP/WPMU installs. Must be a bug or something :-)

  3. pnaw10
    Member
    Posted 4 years ago #

    Thanks for the suggestion. Tried what you suggested, but I just caught it misbehaving the same as when I originally posted.

    It's just past 7pm local time on Thursday, yet the "Friday" graphical header is now appearing on my homepage. This is obviously following UTC or Greenwich Time or whatever -- even though it shouldn't be. (I am in the Eastern U.S.)

  4. kwilde1
    Member
    Posted 4 years ago #

    Polite bump, I'm having the same problem. I'm in US Central time (and have the timezone in settings set accordingly), my server is in US Mountain time. All the current date features reflect UTC time and switch to the following day at 6pm local time.

  5. pnaw10
    Member
    Posted 4 years ago #

    Still having problems with this -- I even inserted some PHP code into my theme's header.php (right before the day-dependent image is called) to try to "force" the proper local time zone to be observed. But still no cigar.

    Also changed my WordPress admin timezone setting back and forth between "America/New York" and UTC-5 several times. Neither is successful. Even though the right time DOES show in the "example" output right there on the WP admin, my homepage is still calling the "It's Friday!" image starting at 7:00pm on Thursdays.

  6. kwilde1
    Member
    Posted 4 years ago #

    Just had some luck changing my time zone from my city to the manual offset (UTC-6 for central timezone). Try using that setting if you aren't already?

  7. modifiedcontent
    Member
    Posted 4 years ago #

    Tried both. Neither worked.

  8. Boris
    Member
    Posted 3 years ago #

    I also encountered this issue. I found a solution that works very well for me, perhaps this 'll help you also. Check the "tutorial" here:
    Tutorial – WordPress: Current Date and Time timezone issue solution
    Good luck!

Topic Closed

This topic has been closed to new replies.

About this Topic