Skip to content

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

@sith-ikjetil

Description

@sith-ikjetil

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions