• Resolved shiftless1486

    (@shiftless1486)


    Hi there!

    I faced an edge case related to a wrong date check when editing a post if WP’s and your time zones are different.

    Example:
    WP has time zone set to UTC+0, and mine is UTC+1.
    Let’s say UTC+0 time is 1 p.m., so mine is 2 p.m..
    I need to schedule publishing in 30 minutes, so I set feature action time to 1:30 p.m. and… get ‘Date cannot be in the past’ error message.

    Use case: I created a post in advance, and at the last minute, I realized I had made a mistake in the content. I tried to change it, but I can’t because of the date check issue.

    I found the root of the issue: you are comparing dates with no information about the time zone (i.e., new Date(date) < new Date()), but an Action is scheduled by taking it into account. You should append date with a WP’s time zone, so it will be adjusted properly.

    Is there a chance it will be fixed?

    Thank you!

    P.S.: on a screenshots below you could see a demonstration of the issue:

    • I have UTC+3 and mine current time is 11:41 a.m.
    • WP set to UTC+2 and it’s current time is 10:41 a.m.
    • Future action set to 10:45
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Steve Burge

    (@stevejburge)

    @shiftless1486 Thanks for using PublishPress Future. Can you share the screenshots you mentioned, please?

    Thread Starter shiftless1486

    (@shiftless1486)

    Thank you for response!

    It wasn’t uploaded some why directly. I’ve uploaded it to image stock (it will available for 7 days):

    Plugin Author Steve Burge

    (@stevejburge)

    Thanks for the details, @shiftless1486.

    I’ll pass this onto our team as possible to-do item for a future version of the plugin.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Date check issue’ is closed to new replies.