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
Developer Community or GitHub 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.
This will work fine on Mono for OSX, but fails in an iOS project:
Our current workaround is to use ParseExact instead:
var d = DateTime.ParseExact(
System.FormatException: String was not recognized as a valid DateTime.
at System.DateTime.Parse (System.String s, IFormatProvider provider, DateTimeStyles styles) [0x00027] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System/DateTime.cs:830
at TestiOSProj.AppDelegate.FinishedLaunching (MonoTouch.UIKit.UIApplication app, MonoTouch.Foundation.NSDictionary options) [0x00000] in /Temp/TestiOSProj/AppDelegate.cs:31
What is your CultureInfo.CurrentCulture? It seems to work for me
The culture is "en-US". I ran this code in iPhone Simulator 6.1
Version 4.0.9 (build 12)
Mono 2.10.12 (mono-2-10/c9b270d)
Xcode 4.6.3 (2068)
Version: 22.214.171.124 (Business Edition)
Build date: 2013-30-05 18:02:40-0400
The bug was filled against 6.9.* Xamarin.iOS but you are running 126.96.36.199 You need at least version 6.3 which should have this fixed already.