22
My computer is configured with a culture that is not en-US.
When using the native Win32 GetDateFormat function, i get correctly formatted dates:
- 22//11//2011 4::42::53 P̰̃M]
This is correct; and is also how Windows renders it:
the taskbar
Region and Language settings
Windows Explorer
Outlook
When i try to convert a date to a string in .NET using my current locale, e.g.:
DateTime.Now.ToString();
DateTime.Now.ToString(CultureInfo.CurrentCulture);
i get an incorrect date:
- 22////11////2011 4::::42::::53 P̰̃M]
This bug in .NET is evident anyplace in Windows that uses the buggy .NET code:
Windows Event Viewer:
Task Scheduler:
SQL Server Management Studio:
How do i make .NET not buggy?
How do i convert dates and times to strings using the current c






