WordPress.org

Make WordPress Core

Opened 6 years ago

Last modified 8 weeks ago

#25399 new defect (bug)

XML-RPC and wp-mail.php struggle with timezone offsets

Reported by: nacin Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Date/Time Keywords: has-patch has-unit-tests
Focuses: Cc:

Description

See iso8601_to_datetime() and wp-mail.php, and #20328 for background.

Change History (7)

#1 @chriscct7
4 years ago

  • Keywords needs-patch needs-unit-tests added

#2 @dossy
4 years ago

See also: #30429, #35053

#3 follow-up: @Rarst
13 months ago

  • Keywords reporter-feedback added

Could we get a bit more detail on "struggles" ? :) Background issue had been marked as resolved since.

I am not too hopeful, but I will be looking into eliminating offset math as much as possible. :\

If we manage to introduce combined timezone retrieval in #24730, then a lot of old crappy logic can be upgraded to DateTime.

This ticket was mentioned in Slack in #core-datetime by rarst. View the logs.


13 months ago

#5 in reply to: ↑ 3 @nacin
13 months ago

Replying to Rarst:

Could we get a bit more detail on "struggles" ? :) Background issue had been marked as resolved since.

It looks like I marked the original issue as resolved and then opened this one to deal with unresolved issues.

For wp-mail.php, this surely must have been referring to the insanity that was later changed in [34864]. Obviously it was more obvious at the time. :-)

For XML-RPC, I did note iso8601_to_datetime(), which is still used in XML-RPC and still uses timezone offset math.

#6 @Rarst
13 months ago

Hm hm, I just don't feel like this specific issue is actionable enough. Whole core suffers from offset math and that is something we are working on eliminating as a global issue.

It doesn't seem like XMLRPC & mail are any more broken than the rest of it (as of right now)?

#7 @Rarst
8 weeks ago

  • Keywords has-patch has-unit-tests added; needs-patch needs-unit-tests reporter-feedback removed

Ok, it seems like iso8601_to_datetime() is so so very broken. Added unit tests and rewrote implementation in #31809

Note: See TracTickets for help on using tickets.