A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/fmtlib/fmt/issues/3815 below:

Invalid (local) %Z and %z with std::chrono::time_point<system_clock> but correct UTC Timestamp (%T) on MSVC · Issue #3815 · fmtlib/fmt · GitHub

Printing with MSVC does not work properly using the Timezone.

When running this example with MSVC

  fmt::print("Got now as {:%FT%T%z}\n",
             std::chrono::time_point<std::chrono::system_clock>::clock::now());

I get the output:
Got now as 2024-01-18T07:09:51.3559309+0100

The timestamp is UTC (local time was 08:09) and UTC time is indeed 07:09, but my time zone (+0100) is printed instead of the correct +0000. On GCC (12.2 on debian) I get the correct time and timezone.

Tested with fmt 10.2.1 and current master. Minimum sample is here:
minimum sample.zip

Changing CXX_STANDARD from 20 to 11 does not lead to different results.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4