[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
Sun Jan 3 15:26:58 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 dossy):
Replying to [comment:22 nacin]:
> [...] And the patch to make this work is a) not ready (for one,
exceptions should absolutely be trapped within `iso8601_to_datetime()`),
Actually, I just realized - I originally wrote the code using the PHP
Date/Time object oriented interface, which throws exeptions. I later
changed the code to exclusively use the procedural interface, which
returns errors instead of throwing exceptions. So, my actual
implementation of `iso8601_to_datetime()` no longer throws exceptions, but
I never update the unit tests to reflect this. I can go ahead and update
the tests, if that's your objection ...
(FWIW, `get_gmt_from_date()` and `get_date_from_gmt()` both use the object
oriented interface, c.f. `new DateTimeZone(...)`,
`$datetime->setTimezone(...)` and `$datetime->format(...)`, all of which
could throw exceptions and are not caught.)
> b) as it stands, too big and too hairy for a point release.
So, 4.5 then? In the meantime, revert all the partial attempts to fix
date handling in 4.4 which fix one bug and introduce another?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35053#comment:25>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list