mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-26 09:28:21 +00:00
Fix set locale error in chrono formatter
This commit is contained in:
parent
3c8fad126c
commit
c123a72844
@ -291,6 +291,7 @@ inline null<> gmtime_s(...) { return null<>(); }
|
||||
inline auto do_write(const std::tm& time, const std::locale& loc, char format,
|
||||
char modifier) -> std::string {
|
||||
auto&& os = std::ostringstream();
|
||||
os.imbue(loc);
|
||||
using iterator = std::ostreambuf_iterator<char>;
|
||||
const auto& facet = std::use_facet<std::time_put<char, iterator>>(loc);
|
||||
auto end = facet.put(os, os, ' ', &time, format, modifier);
|
||||
|
Loading…
Reference in New Issue
Block a user