Skip to content

A DateTime.ToString with CultureInfo("nb-NO") gives the wrong datetime string output on iOS #76596

@rolfbjarne

Description

@rolfbjarne

From @jfversluis on Mon, 03 Oct 2022 14:31:01 GMT


Issue moved from dotnet/maui#10441


From @sith-ikjetil on Saturday, October 1, 2022 2:39:32 PM

Description

If you compile a .NET MAUI project for iOS, you get the wrong datetime format string for Norwegian output.
If you compile a .NET MAUI project for Windows or Android, you get the correct datetime format string for Norwegian output.

I use dotnet --version 6.0.401

Steps to Reproduce

  1. Create a new .NET MAUI APP and compile for iOS.
  2. Anywhere like in 'MauiProgram.cs' do something like:
  3. var dt = DateTime.Now.ToString( new CultureInfo("nb-NO"));
  4. dt will look like: 10/1/2022 4:00:28 PM
  5. dt should look like: 01.10.2022 16:00:286

Link to public reproduction project repository

https://github.com/sith-ikjetil/maui-cultureinfo-no-bug

Version with bug

Unknown/Other (please specify)

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS 15.4

Did you find any workaround?

No response

Relevant log output

No response

Copied from original issue dotnet/macios#16217

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions