Make WordPress Core

Opened 4 months ago

Last modified 3 months ago

#61223 new defect (bug)

Date Time and UTC / GTM Timezone is not synchronizing

Reported by: lamarajan's profile lamarajan Owned by:
Milestone: Awaiting Review Priority: normal
Severity: major Version: 6.5.3
Component: Date/Time Keywords: needs-patch
Focuses: sustainability Cc:

Description

Hello Core Team,

I have found one serious bug in WordPress Related to post publish Date Time. The issue is Time of published post is not synchronizing UTC timezone.

Scenario, I am in Nepal and My WordPress site is set in +0 GMT. Now, I change the timezone of Site to Kathmandu, Nepal (Local Timezone). And, I create a post and publish at 8:00pm (local time +5:45 GMT). Now I get back to setting and changed the timezone ( +0 GMT ). Now I get back to my previos post. And I get my post published time is 8:00PM +0 UTC. This is not a correct time of my post is published.

I have attached the video link and also attached the quick demo video.
https://www.awesomescreenshot.com/video/27695979?key=eacbfc62438d79ed5dc00b8f095b0009

If you have question please let me know,

Thanks,
Rajan Lama (@lamarajan)


Attachments (1)

Posts ‹ WordPress Develop — WordPress (1) (1).mp4 (6.1 MB) - added by lamarajan 4 months ago.
This the screen recorded video for the issue.

Change History (6)

@lamarajan
4 months ago

This the screen recorded video for the issue.

#1 @narenin
4 months ago

Hi,

I am also able to replicate the same at my end.

#2 @narenin
4 months ago

Also that Timezone value(UTC+5:45) show as per the current setting it does not show according to the timezone we had during the post publish time.

Screenshot : https://ibb.co/xmNdqvh

#3 @sabernhardt
3 months ago

  • Component changed from General to Date/Time

#4 @Rarst
3 months ago

WordPress de facto does not support changing time zone, all post times are considered to be in current settings time zone, as you have observed.

Supporting this would require either significant effort to migrate local times every time time zone is changed (there is no strong precedent and support in core for such mechanics) or moving to using UTC times as canonical. We have considered the latter, but it conflicts with support for scheduling posts in core, which requires working with local times (since the future state of time zone relative to UTC is not knowable).

In a nutshell, this would be a complicated thing to implement and demand for it has been relatively low (on a WordPress scale).

#5 @lamarajan
3 months ago

Hello @Rarst ,

Thank you for your suggestion and I understand demand for it has been relatively low but I think this is one of the bug that needs to be handled someday.

Thanks,
@lamarajan

Note: See TracTickets for help on using tickets.