Bug 19497 - System.DateTime.ToString("f") returns wrong format in "en-CA" cultures
Summary: System.DateTime.ToString("f") returns wrong format in "en-CA" cultures
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 7.2.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-05-02 15:28 UTC by egoulet06
Modified: 2014-05-03 12:14 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:
Status:
RESOLVED NOT_REPRODUCIBLE

Description egoulet06 2014-05-02 15:28:25 UTC
System.DateTime.ToString("f") returns different format than windows in "en-CA" cultures

Sample : 
DateTime date = new DateTime(2014, 01, 03, 11, 42, 21);
System.Threading.Thread.CurrentThread.CurrentCulture =
System.Threading.Thread.CurrentThread.CurrentUICulture =
System.Globalization.CultureInfo.GetCultureInfo("en-CA");
Console.WriteLine(date.ToString("f"));

In mono, the output is :
January-03-14 11:42 AM

In windows, the output is :
January 3, 2014, 11:42 AM
Comment 1 Sebastien Pouliot 2014-05-03 12:14:56 UTC
If I execute this I get the following output:

January 3, 2014 11:42 AM

Mono's culture tables were updated in Mono 3.4 (on which XI 7.2.1 is based). Upgrading to the latest stable version should fix your issue.