[wp-trac] [WordPress Trac] #35053: XML-RPC when post with date_created_gmt, its post_date will gmt date not local date
WordPress Trac
noreply at wordpress.org
Sat Jan 2 04:59:35 UTC 2016
#35053: XML-RPC when post with date_created_gmt, its post_date will gmt date not
local date
------------------------------------------+-----------------------------
Reporter: hnle | Owner: wonderboymusic
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 4.4.1
Component: XML-RPC | Version: 4.4
Severity: normal | Resolution:
Keywords: has-unit-tests needs-testing | Focuses:
------------------------------------------+-----------------------------
Comment (by dd32):
I'm hesitant to change `iso8601_to_datetime()` to use date functions
directly, especially in a point release.
FYI WordPress also sets the datetimezone to UTC during bootstrap, so it
can be assumed to be set to that if it makes life easier.
Why is there `try{} catch{}` handling in the unit tests wrapping
`iso8601_to_datetime()`? If those datetimes can throw exceptions they need
to be caught inside `iso8601_to_datetime()`.
Doesn't the `America/New_York` timezone respect DST? If that's the case,
adding 5hrs isn't always correct. Probably best to use a `UTC+x` timezone
for tests so it's explicit.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35053#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list