[Mono-dev] DateTime.ParseExact bug ?

Marek Safar marek.safar at gmail.com
Thu Sep 22 06:39:19 EDT 2011


Hi,

Please fill a bug report at http://bugzilla.xamarin.com/

Thanks
Marek
> Nodbody?
>
> Anywho, since it's an incompability with .net I guess that I should 
> file a bug somewhere?
>
> Best regards,
>
> Nicklas
>
> On 2011-09-19 00:04, Nicklas Overgaard wrote:
>> Yes, i'm very sure - it's copy-paste from the solrnet source code: 
>> https://github.com/mausch/SolrNet/blob/master/SolrNet/Impl/FieldParsers/DateTimeFieldParser.cs
>>
>> And the code-snippet I attached below does indeed work on windows in 
>> .net :)
>>
>> /Nicklas
>>
>> On 2011-09-18 23:00, Stefano Canepa wrote:
>>> Nicklas Overgaard  at "Sun, 18 Sep 2011 18:34:08 +0200" wrote:
>>>   NO>  Hi,
>>>
>>>   NO>  I'm currently working with Solr and SolrNet for a project. However, i'm
>>>   NO>  encountering errors when SolrNet is parsing date times...
>>>
>>>   NO>  I have located the date-time parsing code in SolrNet, and made a sample
>>>   NO>  test application shown below:
>>>
>>>   NO>  <code start>
>>>   NO>  using System;
>>>   NO>  using System.Linq;
>>>   NO>  using System.Globalization;
>>>
>>>   NO>  namespace datetimeparsing
>>>   NO>  {
>>>   NO>       class MainClass
>>>   NO>       {
>>>   NO>           public static void Main (string[] args)
>>>   NO>           {
>>>   NO>               string s = "1984-09-17T09:00:00Z";
>>>   NO>               DateTime dt=  DateTime.ParseExact(s,
>>>   NO>  "yyyy-MM-dd'T'HH:mm:ss.FFF'Z'", CultureInfo.InvariantCulture);
>>>   NO>           }
>>>   NO>       }
>>>   NO>  }
>>>   NO>  </code end>
>>>
>>> Are you sure about the format string? I think that you need to write only
>>> FF'Z instead of FFF'Z. Did you take a look at mono source code?
>>>
>>> Bye
>>> Stefano
>>>
>>
>>
>>
>> _______________________________________________
>> Mono-devel-list mailing list
>> Mono-devel-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20110922/c4c76c02/attachment.html 


More information about the Mono-devel-list mailing list