This project is read-only.

Publishing error.

Apr 27, 2009 at 9:51 PM

When publishing from Live Writer to Oxite I ge the follwing exception:

The value '20090425T17:09:00' cannot be parsed as the type 'DateTime'.

The line this happens on is here:





returnValue =



In :


public static object Deserialize(XmlDictionaryReader reader, Type targetType)

Any Ideas?




Apr 28, 2009 at 5:58 PM
What culture is your OS set to?  Live Writer must be sending a date that the XmlRpc stuff can't read.  Haven't seen this one before.  :(
Apr 28, 2009 at 8:03 PM
After a bit of fiddeling I can see that the message from Live Writer is sending the dates as follows:


As far as I can tell this os ok but DateTime.Parse etc does not take dates like this. The expected format should be allong these lines:


Apr 28, 2009 at 8:14 PM
Any chance you can try changing your culture or date formatting on your machine to see if Live Writer is picking it up wrong or something?
Apr 28, 2009 at 8:57 PM

A useful article! :

I have gone for a belts and braces approach in the code:

case XmlRpcProtocol.DateTime:


string dateString = reader.ReadElementContentAsString();


string[] formats = new string[] { "r", "s", "u", "yyyyMMddTHHmmss", "yyyyMMddTHH:mm:ss", "yyyy-MM-ddTHH:mm:ss" };


DateTime dt = DateTime.ParseExact(dateString, formats,

   CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal);


returnValue = Convert.ChangeType(dt, targetType);


All works for now so I will publish this to my host.

Apr 28, 2009 at 10:36 PM
Cool, glad you got it.  Sampy came to the same conclusion just a few minutes before we saw your post.  We'll make sure this change gets in there for the next release.  Thanks!