failed to set format string via arguments for zoned_time

M ZHA 1 Reputation point
2022-08-14T14:53:55.317+00:00

the test code as below:

#include <iostream>  
#include <chrono>  
using namespace std::chrono;  
  
int main()  
{  
zoned_time zt(current_zone(), system_clock::now());  
std::cout << std::format("{:%T}", zt) << std::endl;  
std::cout << std::format("{:{}}", zt, "%T") << std::endl;  
}  

the output:
22:50:48.6959767
2022-08-14 22:50:48.6959767 GMT+8

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,636 questions
{count} votes