Make WordPress Core

Opened 20 years ago

Closed 19 years ago

#3995 closed defect (bug) (fixed)

Xml-Rpc dateTime inaccurate

Reported by: whilo Owned by:
Priority: normal Milestone: 2.5
Component: XML-RPC Version: 2.0.9
Severity: normal Keywords: has-patch needs-testing
Cc: Focuses:

Description

As stated in the Xml-Rpc standard the datetime object should be <dateTime.iso8601>. Wordpress seems to only accept <datetime.iso8601> . Otherwise I get a date in 1999 or another user even 1970 (good old Unix).

Attachments (2)

3995.diff​ (469 bytes ) - added by rob1n 20 years ago.
removes dashes
3995.2.diff​ (1.7 KB ) - added by rob1n 20 years ago.

Download all attachments as: .zip

Change History (19)

#1 @foolswisdom
20 years ago

Same questions as in #3994. Thank you!

#2 @westi
20 years ago

  • Milestone 2.0.10
  • Resolution → invalid
  • Status new → closed

We only accept ​dateTime.iso8601 as XML is case sensitive. Which is correct according to the spec: ​http://www.xmlrpc.com/spec

#3 @whilo
20 years ago

  • Resolution invalid
  • Status closed → reopened

​ISO_8601

O.k. I think, I've found the real problem with dateTime objects:
As it is stated here, the format can be both YYYYMMDD and YYYY-MM-DD, but Wordpress ​only supports YYYYMMDD. My application uses the second format, which puts a date of 1999 in the database.

Cheers,
Christian

#4 @rob1n
20 years ago

  • Milestone → 2.2

I think I can fix this.

@rob1n
20 years ago

removes dashes

#5 @rob1n
20 years ago

  • Keywords has-patch needs-testing added
  • Owner changed from anonymous to rob1n
  • Status reopened → new

whilo: does my patch fix the problem for you?

#6 @rob1n
20 years ago

  • Status new → assigned

#7 @rob1n
20 years ago

  • Priority normal → low
  • Severity critical → minor

#8 @foolswisdom
20 years ago

  • Milestone 2.2 → 2.3

#9 @westi
20 years ago

  • Priority low → normal
  • Severity minor → normal

I have closed #1528 as a duplicate of this as it is the same issue effectively

#10 follow-up: @rob1n
20 years ago

  • Milestone 2.3 → 2.2

In my second patch, it's all UTC, and uses strtotime() instead for a more extensible approach.

#11 in reply to: ↑ 10 @westi
20 years ago

Replying to rob1n:

In my second patch, it's all UTC, and uses strtotime() instead for a more extensible approach.

I'm not convinced this is the correct approach as we now lose the timezone offset info provided in the iso8601 formatted string.

I think I prefer the first option or reuse the preg_match in iso8601_to_datetime in wp-includes/formatting.php

#12 @rob1n
20 years ago

  • Milestone 2.2 → 2.3

Bump to 2.3.

#13 @rob1n
20 years ago

  • Status assigned → new

#14 @josephscott
19 years ago

We've had a few upheavals with datetime fields in XML-RPC lately. With -trunk right now I think things have been resolved. Do either of the above patches really fix any currently broken items?

#15 @foolswisdom
19 years ago

  • Milestone 2.3 (trunk) → 2.4 (future)

#16 @rob1n
19 years ago

  • Owner rob1n removed

#17 @ryan
19 years ago

  • Resolution → fixed
  • Status new → closed
Note: See TracTickets for help on using tickets.