WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 3 years ago

#41553 closed defect (bug) (invalid)

UTC time is affected by changing WP time zone setting

Reported by: ester17 Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.8.1
Component: Date/Time Keywords: reporter-feedback
Focuses: Cc:

Description

hi
when adjusting timezone to my timezone, which is Tallinn, then i get different results.
the most interesting issue is that UTC time itself is changing if i choose some different timezone. this should not be happening as utc is universal.
i'll attach couple of pictures.
i have discussed the issue with hosting company and they say that time should be correct.
version is WordPress 4.8.1 with Twenty Sixteen theme.

the time is not the issue but the problem arises when used with Revived Ajax Event Calendar. all the times in database are correct but when in calendar view, then times differ by what is the difference in WP settings.

Attachments (5)

1.png (29.1 KB) - added by ester17 4 years ago.
time description with timezone set to Tallinn
2.png (43.4 KB) - added by ester17 4 years ago.
timezone changed to Reykjavik and utc has changed with timezone time itself few minutes later.
asia-kolkata-time-zone.png (209.6 KB) - added by subrataemfluence 4 years ago.
Timezone changed to Asia-Kolkata
Reykjavik-time-zone.png (181.5 KB) - added by subrataemfluence 4 years ago.
Changed to Reykjavík timezone (please look at the local time)
Reykjavik-local-time-in-google.png (191.4 KB) - added by subrataemfluence 4 years ago.
Reykjavík local time on Google (which matches the other screenshot)

Download all attachments as: .zip

Change History (9)

@ester17
4 years ago

time description with timezone set to Tallinn

@ester17
4 years ago

timezone changed to Reykjavik and utc has changed with timezone time itself few minutes later.

#1 @subrataemfluence
4 years ago

Welcome to Trac and thank you for the ticket.

My time zone is Asia > Kolkata. Default timezone setting is UTC+0, as always. To reproduce the issue I changed timezone to my local but did not get the kind of difference you mentioned.

WP Version: 4.8.1
Operating System: Ubuntu / Linux 14.04
Plugins installed: Akismet Anti-Spam and HelloDolly
WP Install type: Fresh install

Can you please try once by deactivating all your plugins first and then re-activating one by one? If the problem is due to some plugins, once you deactivate all of them the issue should get resolved automatically.

There are times when some plugins can get you stuck with something with no real clue.

I have added three screenshots. Hope they will help:

  1. Changed to my Local timezone (Asia > Kolkata).
  1. Changed to Reykjavík, Iceland timezone (your local)
  1. Local Reykjavík time as per Google

@subrataemfluence
4 years ago

Timezone changed to Asia-Kolkata

@subrataemfluence
4 years ago

Changed to Reykjavík timezone (please look at the local time)

@subrataemfluence
4 years ago

Reykjavík local time on Google (which matches the other screenshot)

#2 @Rarst
4 years ago

Unlikely to be caused by core code, it should be pretty straightforward path to time() call in that place.

I would suspect errant filter on date_i18n() or something else messing with it.

#3 @Rarst
4 years ago

  • Summary changed from time difference to UTC time is affected by changing WP time zone setting

#4 @Rarst
3 years ago

  • Keywords reporter-feedback added
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.