mirror of
https://github.com/HowardHinnant/date.git
synced 2025-01-14 01:37:57 +08:00
Supply missing imbues in format
This commit is contained in:
parent
806c29fddc
commit
9e25c2d74f
2
date.h
2
date.h
@ -4006,6 +4006,7 @@ format(const std::locale& loc, std::basic_string<CharT, Traits> fmt,
|
||||
{
|
||||
auto offset = duration_cast<minutes>(*offset_sec);
|
||||
basic_ostringstream<CharT, Traits> os;
|
||||
os.imbue(loc);
|
||||
if (offset >= minutes{0})
|
||||
os << '+';
|
||||
os << make_time(offset);
|
||||
@ -4042,6 +4043,7 @@ format(const std::locale& loc, std::basic_string<CharT, Traits> fmt,
|
||||
}
|
||||
auto& f = use_facet<time_put<CharT>>(loc);
|
||||
basic_ostringstream<CharT, Traits> os;
|
||||
os.imbue(loc);
|
||||
auto ld = floor<days>(tp);
|
||||
auto ymd = year_month_day{ld};
|
||||
auto hms = make_time(floor<seconds>(tp - ld));
|
||||
|
Loading…
x
Reference in New Issue
Block a user