STL icon indicating copy to clipboard operation
STL copied to clipboard

`<chrono>`: `time_zone::get_info` fails when the current code page cannot represent the localized time zone short ID.

Open strega-nil-ms opened this issue 3 years ago • 3 comments

See:

  • Issue #3097
  • PR #3102
  • PR #3122

It seems likely that the result we want is for, if the abbreviation fails to convert, to instead attempt to format UTC+{} or UTC-{}.

strega-nil-ms avatar Oct 14 '22 23:10 strega-nil-ms

If you are still there, the problem is still present. Has any thing changed during recent builds?

OptimumCpp avatar Jun 28 '23 21:06 OptimumCpp

I don't believe so; we need someone who has time to do this, to actually do the work involved; unfortunately, none of the members of the team have had the time.

strega-nil-ms avatar Jun 30 '23 22:06 strega-nil-ms

I have this piece of code:

const std::chrono::seconds::rep utcSeconds{ std::chrono::duration_cast<std::chrono::seconds>(std::chrono::utc_clock::now().time_since_epoch()).count() };

and it throws the exceptions saying The operation completed successfully. The exception is thrown on Windows Server 2012 R2 Datacenter. It works on Windows 11 Pro 22H2. When I use system_clock instead of utc_clock then the code works on the server edition, but when I compare the utc_clock and system_clock result on Windows 11 there is a 26s difference. Is this somehow relevant or should I open new issue?

jbrezina avatar Sep 29 '23 07:09 jbrezina