Skip to content

Commit 5bd83bd

Browse files
committed
Test timezone
1 parent 5f2e61f commit 5bd83bd

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

test/chrono-test.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,11 @@ auto strftime_full_utc(TimePoint tp) -> std::string {
263263
return system_strftime("%Y-%m-%d %H:%M:%S", &tm);
264264
}
265265

266-
TEST(chrono_test, system_clock_time_point) {
266+
TEST(chrono_test, sys_time) {
267+
auto time =
268+
fmt::sys_time<std::chrono::seconds>(std::chrono::seconds(290088000));
269+
EXPECT_EQ(fmt::format("{:%z}", time), "+0000");
270+
267271
auto t1 = std::chrono::time_point_cast<std::chrono::seconds>(
268272
std::chrono::system_clock::now());
269273
EXPECT_EQ(strftime_full_utc(t1), fmt::format("{:%Y-%m-%d %H:%M:%S}", t1));

0 commit comments

Comments
 (0)