diff --git a/include/date/date.h b/include/date/date.h index ded0ba2..29cecdc 100644 --- a/include/date/date.h +++ b/include/date/date.h @@ -7187,6 +7187,7 @@ from_stream(std::basic_istream& is, const CharT* fmt, int tp = not_a_ampm; #if !ONLY_C_LOCALE tm = std::tm{}; + tm.tm_isdst = -1; tm.tm_hour = 1; ios::iostate err = ios::goodbit; f.get(is, nullptr, is, err, &tm, command, fmt+1); diff --git a/include/date/tz.h b/include/date/tz.h index 73b897b..e25a3ee 100644 --- a/include/date/tz.h +++ b/include/date/tz.h @@ -1014,7 +1014,8 @@ public: DATE_API explicit leap_second(const std::string& s, detail::undocumented); #endif - sys_seconds date() const {return date_;} + constexpr sys_seconds date() const noexcept {return date_;} + constexpr std::chrono::seconds value() const noexcept {return std::chrono::seconds{1};} friend bool operator==(const leap_second& x, const leap_second& y) {return x.date_ == y.date_;} friend bool operator< (const leap_second& x, const leap_second& y) {return x.date_ < y.date_;}