Make WordPress Core

Opened 18 years ago

Closed 17 years ago

#3995 closed defect (bug) (fixed)

Xml-Rpc dateTime inaccurate

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

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 18 years ago.
removes dashes
3995.2.diff (1.7 KB) - added by rob1n 18 years ago.

Download all attachments as: .zip

Change History (19)

#1 @foolswisdom
18 years ago

Same questions as in #3994. Thank you!

#2 @westi
18 years ago

  • Milestone 2.0.10 deleted
  • Resolution set to invalid
  • Status changed from new to 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
18 years ago

  • Resolution invalid deleted
  • Status changed from closed to 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
18 years ago

  • Milestone set to 2.2

I think I can fix this.

@rob1n
18 years ago

removes dashes

#5 @rob1n
18 years ago

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

whilo: does my patch fix the problem for you?

#6 @rob1n
18 years ago

  • Status changed from new to assigned

#7 @rob1n
18 years ago

  • Priority changed from normal to low
  • Severity changed from critical to minor

#8 @foolswisdom
18 years ago

  • Milestone changed from 2.2 to 2.3

#9 @westi
18 years ago

  • Priority changed from low to normal
  • Severity changed from minor to normal

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

@rob1n
18 years ago

#10 follow-up: @rob1n
18 years ago

  • Milestone changed from 2.3 to 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
18 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
18 years ago

  • Milestone changed from 2.2 to 2.3

Bump to 2.3.

#13 @rob1n
18 years ago

  • Status changed from assigned to new

#14 @josephscott
18 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
18 years ago

  • Milestone changed from 2.3 (trunk) to 2.4 (future)

#16 @rob1n
18 years ago

  • Owner rob1n deleted

#17 @ryan
17 years ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.