ketee


Hi, I'm using the C# code samples on the "MetaWeblog API Code Samples" page on msdn to get blog entries from my space.

The strange part is that no matter which blog post I get, the dateCreated field is always "1/1/0001 12:00:00 AM". On the actual blog, the posts have real date/times. The title and descriptions I get are from real blog entries, so I know that "getPost" is somewhat working.

Even when I create a new post with the dateCreated field set to DateTime.Now and then get it again, the dateCreated field shows "1/1/0001 12:00:00 AM".

I don't understand why the publish date isn't being retrieved correctly when I use "getPost"... am I missing something

Thanks for any help!




Re: dateCreated always "1/1/0001 12:00:00 AM"

jecray


o , I met the same trouble like u




Re: dateCreated always "1/1/0001 12:00:00 AM"

Windie Chai

me too,anbody who know how to get the right time




Re: dateCreated always "1/1/0001 12:00:00 AM"

Gluttony

Hi, the problem was caused by live spaces use non-standard date format. To fix this, just add this.NonStandard = XmlRpcNonStandard.AllowNonStandardDateTime; statement before calling the Invoke method. For example, the getPost method should like this:

[XmlRpcMethod("metaWeblog.getPost")] 
public Post getPost(
string postid,
string username,
string password){

this.NonStandard = XmlRpcNonStandard.AllowNonStandardDateTime;
return (Post) this.Invoke("getPost", new object[]{ postid, username, password});

}

Good luck!Smile