Make WordPress Core

Opened 11 years ago

Closed 5 years ago

#23203 closed defect (bug) (duplicate)

Scheduling Posts assumes GMT but UI uses local timezone (creating undesired scheduled posts)

Reported by: bananastalktome's profile bananastalktome Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.5
Component: Date/Time Keywords: dev-feedback needs-testing
Focuses: administration Cc:


I experienced an odd behavior when going to edit a page on a newly created site in a multisite environment. The site uses the New York timezone (GMT-5).

When quick-editing the page, I changed the title and slug, but pressing "Update" set the page as "Scheduled" rather than leaving it "Published". This was very confusing, and took a while to figure out and then explain to the end user. It seems that although the date/time is shown in the UI in the current time zone, once submitted the form interprets the time as if it were in GMT. To the end user, it looks like the page should be published since the time shows what we thought was a 5 minutes ago. In reality, the time in the date field is not recognized as 5 minute ago but 4 hours and 55 minutes in the future.

This is a problem in the full edit form for pages in this newly created site as well. When I go to edit the published time/date, the posted time in my timezone is shown. However, even if I hit 'Cancel' the "Update" button changes to "Schedule".

Change History (4)

#1 @SergeyBiryukov
11 years ago

  • Keywords reporter-feedback added

I can only reproduce with the following steps:

  1. Set the timezone to UTC.
  2. Publish a page.
  3. Set the timezone to UTC-5.
  4. Quick Edit the page.
  5. The page will be scheduled, since it's now 5 hours in the future.

This sounds like expected behaviour to me. If the page is created after setting the timezone to UTC-5, it will remain published.

#2 @bananastalktome
11 years ago

  • Keywords dev-feedback added; reporter-feedback removed
  • Severity changed from major to normal

This appears to actually only be a problem with the "Sample Page" created when a new site is created in a multisite environment. This page defaults to the GMT timezone, but when a user changes their site to their desired timezone (in my case, GMT-5), the "Sample Page" post time is set to 5 hours in the future (which I initially overlooked). This is why Quick Edits were scheduling the post rather than leaving it posted.

Although the UI on the full edit page does switch from "Update" to "Schedule" when I go to edit the published date/time (even if I cancel), it does not erroneously schedule the post instead of leaving it as Posted.

Changed from "Major" to "Normal" (possibly down to minor?)

#3 @chriscct7
8 years ago

  • Focuses administration added
  • Keywords needs-testing added

#4 @Rarst
5 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #38774.

This is one of the maaany specific issues, caused by a very broad design flaw — WP considers all post times to be in currently selected time zone, so any time zone change results in massively broken time data on all existing posts.

These are inherently unfixable on individual level, until underlying design issue is addressed.

Note: See TracTickets for help on using tickets.