Forums » Fixing WordPress » utc time and local time problems

  • Resolved vherbine

    (@vherbine)


    When I set the timezone to New York this is what I see:

    Universal time (UTC) is 2017-07-07 08:22:26. Local time is 2017-07-07 04:22:26

    which is incorrect. The current UTC time is 12:22:26 and the current local time is 08:22:26.

    When I set the timezone to UTC-4, this is what I see:

    Universal time (UTC) is 2017-07-07 12:22:26. Local time is 2017-07-07 08:22:26

    which is correct.

    I believe this started with 4.7.

    How can I fix this so I can set my timezone to New York and get the correct time?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    1. If you have shell access, do you get the correct date/time when you type “date” at the command line? If that’s wrong, contact your host.

    2. Try adding the correct timezone to php.ini: http://www.inmotionhosting.com/support/website/php/setting-the-timezone-for-php-in-the-phpini-file

    Thread Starter vherbine

    (@vherbine)

    Thanks for your reply. I don’t have shell access but the host verified the correct date/time.

    I don’t think I have access to change the timezone in the php.ini file either.

    What I don’t understand is why wordpress has the right time when I choose UTC-4 but not when I choose New York as the timezone. They should be the same. Also I don’t understand why changing the timezone is changing the UTC displayed. UTC shouldn’t change with timezone. Timezone is the offset from UTC.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    The issue is with the host or PHP, not wordpress. When you select a timezone, I believe it uses the timezone files that are part of the host’s operating system.

    Thread Starter vherbine

    (@vherbine)

    Thanks again for your help. Turns out it was the calendar plugin I was using (Ajax event calendar by Eran Miller). Once I deactivated that plugin, all the times were correct again.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘utc time and local time problems’ is closed to new replies.