forked from HowardHinnant/date
Merge pull request #75 from gabm/FixMissingLocale
Problem: date::format(..) doesn't compile
This commit is contained in:
4
date.h
4
date.h
@@ -39,6 +39,8 @@
|
|||||||
#include <ostream>
|
#include <ostream>
|
||||||
#include <ratio>
|
#include <ratio>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
#include <sstream>
|
||||||
|
#include <cctype>
|
||||||
|
|
||||||
namespace date
|
namespace date
|
||||||
{
|
{
|
||||||
@@ -4062,7 +4064,7 @@ format(std::basic_string<CharT, Traits> fmt, sys_time<Duration> tp)
|
|||||||
{
|
{
|
||||||
const std::string abbrev("UTC");
|
const std::string abbrev("UTC");
|
||||||
CONSTDATA std::chrono::seconds offset{0};
|
CONSTDATA std::chrono::seconds offset{0};
|
||||||
return detail::format(std::move(fmt), local_time<Duration>{tp.time_since_epoch()},
|
return detail::format(std::locale{}, std::move(fmt), local_time<Duration>{tp.time_since_epoch()},
|
||||||
&abbrev, &offset);
|
&abbrev, &offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user