[wp-trac] [WordPress Trac] #2812: XMLRPC misinterprets iso8601 time when posting/editing.

WordPress Trac wp-trac at lists.automattic.com
Sat Jun 10 17:53:01 GMT 2006


#2812: XMLRPC misinterprets iso8601 time when posting/editing.
-----------------------+----------------------------------------------------
       Id:  2812       |      Status:  new                     
Component:  XML-RPC    |    Modified:  Sat Jun 10 17:53:01 2006
 Severity:  normal     |   Milestone:                          
 Priority:  normal     |     Version:  2.0.2                   
    Owner:  anonymous  |    Reporter:  ddaiter                 
-----------------------+----------------------------------------------------
 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.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/2812>
WordPress Trac <http://wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list