Cook Computing

XML-RPC Problem with MT/TypePad

August 14, 2003 Written by Charles Cook

Matt Berther and Greg Reinacker have pointed out an implementation difference between the XML-RPC endpoints exposed by Movable Type and Typepad. The root cause of problem is that the XML-RPC value type dateTime.iso8601 does not contain a timezone. According to the XML-RPC spec:

What timezone should be assumed for the dateTime.iso8601 type? UTC? localtime?

Don't assume a timezone. It should be specified by the server in its documentation what assumptions it makes about timezones.

The two implementatons - although they expose the same XML-RPC API - make different assumptions about the timezone. MT assumes that all dateTimes are specified in the timezone selected in the weblog config, whereas TypePad assumes that they contain either an implicit timezone, i.e. the time is in UTC, or an explicit timezone, e.g. "2003-08-11T20:34:15-6:00". However the latter case is not valid a XML-RPC value and cannot be passed by compliant XML-RPC libraries.

This can lead to confusion when using XML-RPC.NET (and maybe other libraries). If the client sets a .NET DateTime value to, say, 20:34, this time is treated as being in the local timezone. However when the DateTime value is passed into an XML-RPC method the resulting dateTime.iso8601 value will contain "2003-08-11T20:34:15", so losing the timezone information. TypePad will then take this to be 20:34 UTC, which is not what the client might be expecting.

To summarize:

Movable Type - the time in dateTime.iso8601 values is in the timezone configured for the weblog

Typepad - the time in dateTime.iso8601 values is in UTC.