Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 6832 [details]
Hello world, with code to show the bug added.
I've been porting a Windows project that reads date strings with the format "ddd MMM dd HH:mm:ss yyyy". This format raises an InvalidFormatException in Mono.
-> class libs
The format dd should be used for 2 digit numbers from 01 through 31, a 0 should precede numbers less than 10.
The format "ddd MMM dd HH:mm:ss yyyy" is expecting something like "Sat May 03 08:00:35 2014".
To parse "Sat May 3 08:00:35 2014",
ParseExact should be called with the format "ddd MMM d HH:mm:ss yyyy" and DateTimeStyles.AllowInnerWhite.
.NET throws same exception
Ah, verified. Mea culpa, I'm sorry. The Windows machine actually had different data for my program (it had the May 03 format), and I didn't try out my "hello.cs" test case on Windows.
Sorry to waste time in the bug system, but very grateful for the education in DateFormat.ParseExact, and also for the reminder of how to test a bug properly before submitting it. I intend to do a lot of work in Mono, and hope to be able to contribute to the platform; I'll do better in future.