Possible Duplicate:
In C#, given a DateTime object, how do I get a ISO 8601 date in string format?
In my .NET C# program I'm using CookComputing.XmlRpcV2.dll
I have an XMLRPC client that needs to connect to a xmlrpc server. I need to send an iso8601 datetime format with time zone (20121018T00:00:12+0200). So far I have tried Convert.ToDateTime(DateTime.UtcNow.ToString("o"))
, but this returns <dateTime.iso8601>20121009T16:06:47</dateTime.iso8601>
, which is not the desire result I'm looking for.