Support formatting of subseconds (#3115)

* Timestamp formatting shall print also subseconds, fixed a bug for fractional durations
This commit is contained in:
Patrick Roocks
2022-10-12 23:33:53 +02:00
committed by GitHub
parent cfb34a0607
commit 9254cfa6f0
3 changed files with 264 additions and 117 deletions

View File

@ -285,7 +285,8 @@ std::wstring system_wcsftime(const std::wstring& format, const std::tm* timeptr,
}
TEST(chrono_test_wchar, time_point) {
auto t1 = std::chrono::system_clock::now();
auto t1 = std::chrono::time_point_cast<std::chrono::seconds>(
std::chrono::system_clock::now());
std::vector<std::wstring> spec_list = {
L"%%", L"%n", L"%t", L"%Y", L"%EY", L"%y", L"%Oy", L"%Ey", L"%C",