tukarambande / xmlrpcnet

Automatically exported from code.google.com/p/xmlrpcnet
0 stars 0 forks source link

Parsedatetime #72

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I need few clarification on the parsing of datetime. The response I am getting 
is 20090209T22:20:01+01:00

And the XML-RPC.NET library throws an error(response contains invalid dateTime 
value) during parsing. Please see the below code where its going to the else 
part and not able to parse.

if (MapZerosDateTimeToMinValue && s.StartsWith("0000")

&& (s == "00000000T00:00:00" || s == "0000-00-00T00:00:00Z"

|| s == "00000000T00:00:00Z" || s == "0000-00-00T00:00:00"))

retVal = DateTime.MinValue;

else

retVal = DateTime.ParseExact(s, dateTimeFormat,

DateTimeFormatInfo.InvariantInfo);

So could you please let me know how to handle this. Do I need to modify the 
library or anything I can do either.

Thanks 
Swagat

Original issue reported on code.google.com by zania.ze...@gmail.com on 29 Jun 2010 at 3:55

GoogleCodeExporter commented 8 years ago
Revision 120: enhanced parsing of dateTime.iso8601 to include wider range of 
formats.

Original comment by ChasC...@gmail.com on 8 Aug 2010 at 4:13