[Mono-dev] DateTime.ParseExact bug ?

Nicklas Overgaard nicklas at isharp.dk
Sun Sep 18 12:34:08 EDT 2011


I'm currently working with Solr and SolrNet for a project. However, i'm 
encountering errors when SolrNet is parsing date times...

I have located the date-time parsing code in SolrNet, and made a sample 
test application shown below:

<code start>
using System;
using System.Linq;
using System.Globalization;

namespace datetimeparsing
     class MainClass
         public static void Main (string[] args)
             string s = "1984-09-17T09:00:00Z";
             DateTime dt=  DateTime.ParseExact(s, 
"yyyy-MM-dd'T'HH:mm:ss.FFF'Z'", CultureInfo.InvariantCulture);
</code end>

Running this on .net 3.5 (windows 2008 r2 serve) is successful. Running 
it on my machine with mono 2.10.5, I get:

"Unhandled Exception: System.FormatException: Invalid format string"

Which leads me to believe that it's not a fault in SolrNet but rather 

Best regards,


More information about the Mono-devel-list mailing list