Opened 22 months ago
Last modified 12 months ago
#62229 new defect (bug)
post_status dropdown in Quick Edit incorrect if the admin user's timezone is "behind" the site's timezone
| Reported by: | pbiron | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Quick/Bulk Edit | Version: | 6.3 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | javascript |
Description (last modified by )
[55560] introduced a bug of its own.
Steps to reproduce:
- set the site's Timezone to something East of admin user's timezone (e.g., admin user's timezone is America/Denver and the site's new Timezone is America/New York).
- create a post and publish it
- Quick Edit the newly published post and see that the options in the Status dropdown are "Scheduled", "Pending Review", and "Draft"...with "Scheduled" selected.
Expected result: the options should be "Published", "Pending Review", and "Draft"...with "Published" selected.
Change History (5)
#4
@
12 months ago
The bug is still there (WP 6.8.2)
inline-edit-post.js line 433
var post_date_string = $(':input[name="aa"]').val() + '-' + $(':input[name="mm"]').val() + '-' + $(':input[name="jj"]').val();
post_date_string += ' ' + $(':input[name="hh"]').val() + ':' + $(':input[name="mn"]').val() + ':' + $(':input[name="ss"]').val();
var post_date = new Date( post_date_string );
// ------- I DO NOT SEE TIMEZONE HERE ^^^ ---------
// ------- Then the comparison below looks wrong
// ------- If WP date is UTC and Admin timezone is UTC+..
status = $('._status', rowData).text();
if ( 'future' !== status && Date.now() > post_date ) {
$('select[name="_status"] option[value="future"]', editRow).remove();
} else {
$('select[name="_status"] option[value="publish"]', editRow).remove();
}
This ticket was mentioned in PR #9711 on WordPress/wordpress-develop by @karthikeya01.
12 months ago
#5
- Keywords has-patch added
Trac ticket: https://core.trac.wordpress.org/ticket/62229
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
related: #38834