aspire: The time format on the dashboard does not use local culture

My local cultural time format is H:mm:ss, but the dashboard is now using tth:mm:ss

image

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 31 (31 by maintainers)

Most upvoted comments

I added zh-CN to the allowed list and fixed the culture cache, resulting in the expected time format Note: I am using the main branch, not your branch

        return s_formatStrings.GetOrAdd(cultureInfo.Name, static name =>
        {
            var c = new CultureInfo(name, true);
            var longTimePatternWithMilliseconds = GetLongTimePatternWithMillisecondsCore(c);
            return new MillisecondFormatStrings(longTimePatternWithMilliseconds, c.DateTimeFormat.ShortDatePattern + " " + longTimePatternWithMilliseconds);
        });

image

I didn’t expect it to. My change was about getting the browser time zone. This is a culture problem. They’re separate concerns.