Home > OS >  Does GCC or Clang implement chrono::current_zone()?
Does GCC or Clang implement chrono::current_zone()?

Time:01-26

Cppreference mentions function current_zone() as part of the timezone implementation in <chrono>. Has this feature been implemented in GCC or Clang? I would like to test it in one of the online tools, such as https://wandbox.org or https://godbolt.org/, but it seems to be missing.

CodePudding user response:

Compiler support for C 20 - cppreference.com

C 20 feature Paper(s) GCC libstdc Clang libc MSVC STL Apple Clang
Calendar and timezone P0355R7 11 (partial) 7 (partial) 19.29 (16.10)* 10.0.0*

So there is some support, but basically you have to check compilers documentation to se in details what is already implemented, or just try and see. For now using example from docks compiles only for msvc.

Note this feature is based on Howard Hinnant's date library which you can use with older version of C standard.

CodePudding user response:

There are no results in https://github.com/llvm/llvm-project/search?q=current_zone (except clangd indexer) and in https://github.com/gcc-mirror/gcc/search?q=current_zone (except for disabled chrono C 20 conformance test stuff).

Does GCC or Clang implement chrono::current_zone()?

No, not currently.

  •  Tags:  
  • Related