WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#2812 closed defect (bug) (invalid)

XMLRPC misinterprets iso8601 time when posting/editing.

Reported by: ddaiter Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.0.2
Component: XML-RPC Keywords: Timezone
Focuses: Cc:

Description

It's actually 2.0.3

It looks like the time is being interpreted incorrectly for instance the following: "<dateTime.iso8601>20060610T16:47:07</dateTime.iso8601>" is being interpreted as local time instead of GMT (local in my case would be "<dateTime.iso8601>20060610T16:47:07-07:00</dateTime.iso8601>"). As a result the posts are not shown for the next 7 hours (in my case). If I swithc my blog time to GMT everything works just fine.

Detailed example (timezone is -0700, local time is 09:47:07):

The client (Semagic) sends the following:
<?xml version="1.0" encoding="UTF-8"?>
<methodCall><methodName>metaWeblog.editPost</methodName><params><param><value><string>39</string></value></param><param><value><string></string></value></param><param><value><string>*</string></value></param><param><value><struct><member><name>title</name><value><string>Test</string></value></member><member><name>description</name><value><string>Test</string></value></member><member><name>dateCreated</name><value><dateTime.iso8601>20060610T16:47:07</dateTime.iso8601></value></member><member><name>mt_allow_comments</name><value><int>1</int></value></member><member><name>mt_allow_pings</name><value><int>1</int></value></member><member><name>mt_convert_breaks</name><value><string></string></value></member><member><name>mt_text_more</name><value><string></string></value></member><member><name>mt_excerpt</name><value><string></string></value></member><member><name>mt_keywords</name><value><string>Uncategorized</string></value></member><member><name>categories</name><value><array><data><value>Uncategorized</value></data></array></value></member></struct></value></param><param><value><boolean>1</boolean></value></param></params></methodCall>

After that the DB record lossk as the following:
INSERT INTO wp_posts VALUES (39, 1, '2006-06-10 09:47:07', '2006-06-10 23:47:07', 'Test1', 'Test', 0, , 'publish', 'open', 'open', , 'test', , , '2006-06-10 09:47:16', '2006-06-10 16:47:16', , 0, '*', 0, , , 0) ;

Apparently, Wordpress added 7 hours to the GMT time above.

Change History (2)

comment:1 ddaiter8 years ago

Here is the full client request dump:
<?xml version="1.0"
encoding="UTF-8"?>
<methodCall><methodName>metaWeblog.editPost</methodName><par
ams><param><value><string>39</string></value></param><param>
<value><string>*</string></value></param><param><value><
string>*</string></value></param><param><value><struct

<member><name>title</name><value><string>Test</string></val

ue></member><member><name>description</name><value><string>T
est2</string></value></member><member><name>dateCreated</nam
e><value><dateTime.iso8601>20060610T16:47:07</dateTime.iso86
01></value></member><member><name>mt_allow_comments</name><v
alue><int>1</int></value></member><member><name>mt_allow_pin
gs</name><value><int>1</int></value></member><member><name>m
t_convert_breaks</name><value><string></string></value></mem
ber><member><name>mt_text_more</name><value><string></string

</value></member><member><name>mt_excerpt</name><value><str

ing></string></value></member><member><name>mt_keywords</nam
e><value><string>Uncategorized</string></value></member><mem
ber><name>categories</name><value><array><data><value>Uncate
gorized</value></data></array></value></member></struct></va
lue></param><param><value><boolean>1</boolean></value></para
m></params></methodCall>

comment:2 ddaiter8 years ago

  • Resolution set to invalid
  • Status changed from new to closed

Please disregard. The problem has been solved on the client side by fully complying with iso8601 - adding "Z" at the end of a GMY timestamp.

Note: See TracTickets for help on using tickets.