Optimize %T in tm formatting

This commit is contained in:
Vladislav Shchapov
2021-09-15 07:33:24 -07:00
committed by Victor Zverovich
parent aaeca12d89
commit 92614ecbf9
2 changed files with 12 additions and 1 deletions
+1
View File
@@ -49,6 +49,7 @@ TEST(chrono_test, format_tm) {
EXPECT_EQ(fmt::format("The date is {:%Y-%m-%d %H:%M:%S}.", tm),
"The date is 2016-04-25 11:22:33.");
EXPECT_EQ(fmt::format("{:%F}", tm), "2016-04-25");
EXPECT_EQ(fmt::format("{:%T}", tm), "11:22:33");
}
TEST(chrono_test, grow_buffer) {