[wp-trac] [WordPress Trac] #44975: REST API support switching draft to unscheduled

WordPress Trac noreply at wordpress.org
Mon Sep 23 13:35:34 UTC 2019


#44975: REST API support switching draft to unscheduled
-------------------------------------------------+-------------------------
 Reporter:  mnelson4                             |       Owner:
                                                 |  adamsilverstein
     Type:  feature request                      |      Status:  assigned
 Priority:  normal                               |   Milestone:  5.3
Component:  REST API                             |     Version:  4.7
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch 2nd-opinion has-unit-      |     Focuses:
  tests                                          |
-------------------------------------------------+-------------------------

Comment (by Rarst):

 Was asked to comment from Date/Time component perspective and... it's
 kinda highly not obvious.

 1. Sending `null` to null a date value makes sense on REST API level.
 2. However underlying ''concept'' of null date in core is a mess.

 "Zeroed" date is used as null value in database schema, but it's actually
 a ''valid'' date in PHP 7. So the legacy logic built on top of that is
 very likely in ''some'' state of broken at the moment.

 So I suppose... If you want to literally zero a date then send null and
 call it done. Something is probably broken about it though.

 Actual solution would really be designing a proper state of the post for
 this and how it transitions, which very likely would need to be dedicated
 and explicit, not derived from date fields.

 PS for an extra level of not fun UTC dates specifically are unsuitable for
 scheduling purposes, because users schedule ''local'' time and any future
 time zone states relative from UTC are unknown.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44975#comment:32>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list