#48625 closed defect (bug) (invalid)
The post publish time in wp-admin/post.php appears in UTC
Reported by: | Biranit | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.3 |
Component: | Date/Time | Keywords: | close |
Focuses: | administration | Cc: |
Description
Hi,
After upgrading to WordPress 5.3, the time shown inside <span id="timestamp"> for a published post, is displayed in UTC. Our website's timezone is UTC+2, the server's timezone as well as the PHP ini timezeon is Asia/Jerusalem. Despite this, a post published at 08:00 shows on wp-admin/post.php as having been published at 06:00.
This is only the case for wp-admin/post.php -- in the list of posts, the "time ago" is correct. The time is also correct in RSS feeds, on the post page (frontend), etc.
Thanks,
Bira
Change History (10)
#2
@
5 years ago
I don't think I understand exact place you are talking about.
Are you using Classic Editor? Screenshot might be helpful, if not too much trouble. :)
#5
@
5 years ago
I am using the classic editor (I have "disable guttenberg" installed).
The above post was published at 06:38 (UTC+2)...
#6
follow-up:
↓ 8
@
5 years ago
This plugin to be clear https://wordpress.org/plugins/disable-gutenberg/ ?
I cannot reproduce locally, the time displays correctly for me...
- Does this happen on every post or just some posts?
- Could you look up what's the
post_date
is in database for post you used as example? - You mentioned that you set Jerusalem timezone in PHP, any chance you are trying to do this during WP operation as well? WP core resets PHP time zone on boot to UTC and relies on that assumption (we are working to making it more robust, but we are not there 100% yet).
This ticket was mentioned in Slack in #forums by joyously. View the logs.
5 years ago
#8
in reply to:
↑ 6
@
5 years ago
- Keywords close added
- Resolution set to invalid
- Status changed from new to closed
Replying to Rarst:
This plugin to be clear https://wordpress.org/plugins/disable-gutenberg/ ?
I cannot reproduce locally, the time displays correctly for me...
- Does this happen on every post or just some posts?
- Could you look up what's the
post_date
is in database for post you used as example?- You mentioned that you set Jerusalem timezone in PHP, any chance you are trying to do this during WP operation as well? WP core resets PHP time zone on boot to UTC and relies on that assumption (we are working to making it more robust, but we are not there 100% yet).
OK, your questions made me go detective a little more - and you are right, there was a date_default_timezone_set('Asia/Jerusalem') in our global functions...
I am very sorry to have bothered you all. I removed this line and it seems everything is working correctly now. My apologies.
Might be related: #48384