WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#26033 closed defect (bug) (fixed)

Dashboard math error with scheduled posts

Reported by: Ipstenu Owned by: SergeyBiryukov
Milestone: 3.8 Priority: normal
Severity: normal Version: 3.8
Component: Date/Time Keywords: has-patch
Focuses: Cc:

Description

Today is the 15th.

I have a post set to go up tomorrow at 7:30am.

Dashboard says it's set for TODAY at 7:30am

Attachments (5)

Screen Shot 2013-11-14 at 1.47.21 PM.png (33.8 KB) - added by Ipstenu 7 years ago.
View from Post Edit Page
Screen Shot 2013-11-14 at 1.47.36 PM.png (24.9 KB) - added by Ipstenu 7 years ago.
View from my dashboard
Screen Shot 2013-11-16 at 16 Nov - 5.33.08 PM.png (33.1 KB) - added by Ipstenu 7 years ago.
Another view of the dashboard
26033.patch (889 bytes) - added by SergeyBiryukov 7 years ago.
26033.2.patch (718 bytes) - added by SergeyBiryukov 7 years ago.
Refreshed after [26241]

Download all attachments as: .zip

Change History (13)

@Ipstenu
7 years ago

View from Post Edit Page

@Ipstenu
7 years ago

View from my dashboard

#1 @dd32
7 years ago

What timezone is set under Settings -> General?

#2 @Ipstenu
7 years ago

Los Angeles (Pacific US)

#3 @SergeyBiryukov
7 years ago

  • Component changed from General to Date/Time

The screenshot from Edit Posts screen displays 2013/11/15 too, so the date at least appears to be consistent in both places. Is this a regression from 3.7?

@Ipstenu
7 years ago

Another view of the dashboard

#4 @Ipstenu
7 years ago

Sergey, can this be called a 'regression' if the feature is part of what's new in Dashboard?

And no, the dates are NOT the same, unless I misunderstand your meaning here. The screenshots were taken on the 14th, local time Pacific US, WP time Pacific Us.

"View from my dashboard" shows a post scheduled for tomorrow to be scheduled for today in the past. Time was right, day was wrong.

"View from Post Edit Page" remains correct, as always.

I have just attached "Another view of the dashboard" and that says that "Facebook Scam Artist" is scheduled for 'tomorrow' however today is 16 Nov 2013, and the post is actually scheduled for the 18th.

I think the problem here is the Dashboard is pulling up GMT time instead of honoring my setup's local time.

Last edited 7 years ago by Ipstenu (previous) (diff)

#5 @SergeyBiryukov
7 years ago

  • Milestone changed from Awaiting Review to 3.8

Replying to Ipstenu:

Sergey, can this be called a 'regression' if the feature is part of what's new in Dashboard?

That would be a new bug then :)

And no, the dates are NOT the same, unless I misunderstand your meaning here. The screenshots were taken on the 14th, local time Pacific US, WP time Pacific Us.

In the ticket description, you said:

Today is the 15th. I have a post set to go up tomorrow at 7:30am.

So I assumed that the correct date would be the 16th. However, the second screenshot displays 2013/11/15, so it looked like both dates were incorrect, not just the one in Dashboard.

I think the problem here is the Dashboard is pulling up GMT time instead of honoring my setup's local time.

That's my assumption as well. Thanks for the clarification, dashboard_relative_date() is indeed new in 3.8.

#6 @SergeyBiryukov
7 years ago

26033.patch should fix this.

The current check doesn't make sense to me. It just assumes that if there are less than 24 hours until the scheduled publish time, it's "today". If 24 to 48 hours, it's "tomorrow". It doesn't take actual dates into account.

#7 @SergeyBiryukov
7 years ago

  • Keywords has-patch added

@SergeyBiryukov
7 years ago

Refreshed after [26241]

#8 @SergeyBiryukov
7 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 26242:

Fix date comparison in dashboard_relative_date(). fixes #26033.

Note: See TracTickets for help on using tickets.