failed to set format string via arguments for zoned_time
M ZHA
1
Reputation point
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