Add missing 'backward' file and correct output of negative values for time_of_day_storage.

This commit is contained in:
Howard Hinnant
2015-07-18 17:40:18 -04:00
parent 796448e4ad
commit a431164fcd
2 changed files with 5 additions and 5 deletions

6
date.h
View File

@@ -3105,7 +3105,7 @@ public:
{
using namespace std;
save_stream _(os);
if (t.h_ < std::chrono::hours{0})
if (static_cast<precision>(t) < std::chrono::hours{0})
os << '-';
os.fill('0');
os.flags(std::ios::dec | std::ios::right);
@@ -3171,7 +3171,7 @@ public:
{
using namespace std;
save_stream _(os);
if (t.h_ < std::chrono::hours{0})
if (static_cast<precision>(t) < std::chrono::hours{0})
os << '-';
os.fill('0');
os.flags(std::ios::dec | std::ios::right);
@@ -3246,7 +3246,7 @@ public:
{
using namespace std;
save_stream _(os);
if (t.h_ < std::chrono::hours{0})
if (static_cast<precision>(t) < std::chrono::hours{0})
os << '-';
os.fill('0');
os.flags(std::ios::dec | std::ios::right);

4
tz.cpp
View File

@@ -28,7 +28,7 @@ static std::string install{"/Users/howardhinnant/Downloads/tzdata2015e"};
static const std::vector<const std::string> files =
{
"africa", "antarctica", "asia", "australasia", "etcetera", "europe",
"africa", "antarctica", "asia", "australasia", "backward", "etcetera", "europe",
"pacificnew", "northamerica", "southamerica", "systemv", "leapseconds"
};
@@ -1326,7 +1326,7 @@ operator<<(std::ostream& os, const Zone& z)
for (auto const& s : z.zonelets_)
{
os << indent;
if (s.gmtoff_ >= minutes{0})
if (s.gmtoff_ >= seconds{0})
os << ' ';
os << make_time(s.gmtoff_) << " ";
os.width(15);