CultureInfo.CurrentCulture.DateTimeFormat != Android format

The format returned by CultureInfo.CurrentCulture.DateTimeFormat is not the same as the format displayed in the rest of Android and also does not take account of the "Use 24-hour format" setting.

For example:

  • With the language set to English (United Kingdom) the time is by default, 24 hour. If I uncheck "Use 24-hour format" Android shows a format without AM/PM. CultureInfo.CurrentCulture.DateTimeFormat.ShortTimePattern still returns HH:mm:ss.

  • With the language set to English (United States) the time by default is 24 hour so the opposite happens. Interestingly, CultureInfo.CurrentCulture.DateTimeFormat.ShortTimePattern returns h:mm tt which does not match the format displayed in the rest of Android of h:mm.

Is this expected or a bug?

Posts

Sign In or Register to comment.