Make WordPress Core

Opened 19 months ago

Last modified 19 months ago

#57742 new defect (bug)

Post date time not updating after Timezone change

Reported by: nazmulhudadev's profile nazmulhudadev Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.1.1
Component: General Keywords: has-patch
Focuses: administration Cc:

Description

Please create a post first and check the date time from Dashboard post list view. Assume, it's 1:30pm.
Now, change the Timezone from the settings and check the previous post date time again and you will see the time is not updated.

I would expect that the published date would reflect the timezone change

Attachments (3)

57742.png (109.6 KB) - added by welcher 19 months ago.
Date in post list view that is not updating after the timezone change
Screenshot at Feb 17 11-19-56.png (315.8 KB) - added by hztyfoon 19 months ago.
timezone changing doesn't apply for older posts
57742.diff (1.2 KB) - added by sakibmd 19 months ago.
I have also checked @nazmulhudadev's PR and it's working great.

Download all attachments as: .zip

Change History (10)

@welcher
19 months ago

Date in post list view that is not updating after the timezone change

#1 @welcher
19 months ago

Created at WCAsia 2023 contributor day

#2 @welcher
19 months ago

Possibly related #52501

@hztyfoon
19 months ago

timezone changing doesn't apply for older posts

#3 @hztyfoon
19 months ago

I've also checked it from WCAsia 2023 contributor day & also found it on my end.

In the screenshot I shared:
the 2 posts was created within 2 minutes but before publishing the 2nd post the timezone was changed from 'UTC' to 'utc+7' but only the 2nd post's timezone changed but not the posts published before that.

I think all the post should be changed/converted to the new timezone.

This ticket was mentioned in PR #4090 on WordPress/wordpress-develop by @nazmulhudadev.


19 months ago
#4

  • Keywords has-patch added

This ticket was mentioned in PR #4092 on WordPress/wordpress-develop by @sakibmd.


19 months ago
#5

When we change GMT & click on save changes then all the post Date updated automatically based on the currently selected Timezone.

Trac ticket: https://core.trac.wordpress.org/ticket/57742

@sakibmd
19 months ago

I have also checked @nazmulhudadev's PR and it's working great.

#6 @hasanmisbah
19 months ago

I've tested @sakibmd's patch and @nazmulhudadev's PR both are working fine. thanks for your contribution.

#7 @welcher
19 months ago

This is great! The code looks fine to me. I took a brief look and didn't see any unit tests for the column_date function - do we need to add them?

Maybe one of the core committers who attended contributor day would be open to reviewing it as well? @adamsilverstein @desrosj @mikeschroder

Note: See TracTickets for help on using tickets.