mirror of
https://github.com/fmtlib/fmt.git
synced 2026-05-04 11:44:08 +02:00
Make chrono formatting locale-independent by default
This commit is contained in:
+5
-5
@@ -228,11 +228,11 @@ auto format_tm(const std::tm& time, fmt::string_view spec,
|
||||
return os.str();
|
||||
}
|
||||
|
||||
# define EXPECT_TIME(spec, time, duration) \
|
||||
{ \
|
||||
auto jp_loc = std::locale("ja_JP.utf8"); \
|
||||
EXPECT_EQ(format_tm(time, spec, jp_loc), \
|
||||
fmt::format(loc, "{:" spec "}", duration)); \
|
||||
# define EXPECT_TIME(spec, time, duration) \
|
||||
{ \
|
||||
auto jp_loc = std::locale("ja_JP.utf8"); \
|
||||
EXPECT_EQ(format_tm(time, spec, jp_loc), \
|
||||
fmt::format(jp_loc, "{:L" spec "}", duration)); \
|
||||
}
|
||||
|
||||
TEST(chrono_test, locale) {
|
||||
|
||||
Reference in New Issue
Block a user