[wp-trac] [WordPress Trac] #39954: REST API: Improve date updates if both `date` and `date_gmt` are set
WordPress Trac
noreply at wordpress.org
Tue Mar 7 22:37:24 UTC 2017
#39954: REST API: Improve date updates if both `date` and `date_gmt` are set
-------------------------+------------------------------
Reporter: jnylen0 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version: 4.7
Severity: minor | Resolution:
Keywords: | Focuses:
-------------------------+------------------------------
Comment (by mnelson4):
What if I'm on a holiday in a different timezone when I wrote the post?
Might it make sense for the `date` and `date_gmt` to not differ by
gmt_offset? (Eg I'm usually in New York, UTC-5, but I went on a trip to
Los Angeles, UTC-8, and wrote a post at 12pm while there, so it's `date`
is 12:00, and its `date_gmt` is 20:00). If that's a valid case, then when
someone provides both the `date` and `date_gmt`, we should probably just
use those two values exactly, and not apply `gmt_offset` to either.
Or maybe the dates should just always be in the site's timezone,
regardless of the author's local time? If so, disregard this comment.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39954#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list