From 609dd499347967a2f6c9f5358ac9451295b7b69b Mon Sep 17 00:00:00 2001
From: Howard Hinnant
@@ -718,12 +718,6 @@ which is equal to zoned_time
default constructor.zoned_time
default constructor.nullptr
.
-Should zoned_time
have a default constructor, and if so, what should its
-value be?
-
Returns: If ok()
, returns a sys_days
-holding a count of days
before or since the
-sys_days
epoch. Otherwise returns a
+holding a count of days
from the sys_days
epoch to
+*this
(a negative value if *this
represents a date
+prior to the sys_days
epoch). Otherwise returns a
sys_days
which is offset from
sys_days{y_/m_/last}
by the number of days
d_
is offset from sys_days{y_/m_/last}.day()
.
-Remarks: A sys_days
which is converted to a year_month_day
,
-shall have the same value when converted back to a sys_days
.
+Remarks: A sys_days
in the range
+[days{-12687428}, days{11248737}]
which is converted to a
+year_month_day
, shall have the same value when converted
+back to a sys_days
.
[Example: @@ -6777,13 +6774,13 @@ constexpr explicit year_month_day::operator local_days() const noexcept;
@@ -7177,8 +7174,7 @@ constexpr year_month_day_last::operator sys_days() const noexcept; Requires:-Requires:
ok() == true
. +Requires:y_.ok() && m_.ok() == true
.Effects: Equivalent to:
-return local_days{static_cast<sys_days>(*this).time_since_epoch()}; +return local_days{sys_days{*this}.time_since_epoch()};
ok() == true
.
-Returns: A sys_days
which represents the date represented by
-*this
.
+Effects: Equivalent to: return sys_days{year()/month()/day()};
ok() == true
.
-Effects: Equivalent to:
+Effects: Equivalent to: return local_days{sys_days{*this}.time_since_epoch()};
-return local_days{static_cast<sys_days>(*this).time_since_epoch()}; -
@@ -7586,11 +7579,8 @@ constexpr explicit year_month_weekday::operator local_days() const noexcept; Requires:ok() == true
.-Effects: Equivalent to: +Effects: Equivalent to:
-return local_days{sys_days{*this}.time_since_epoch()};
-return local_days{static_cast<sys_days>(*this).time_since_epoch()}; -@@ -7920,11 +7910,8 @@ constexpr explicit year_month_weekday_last::operator local_days() const noexcept Requires:ok() == true
.-Effects: Equivalent to: +Effects: Equivalent to:
-return local_days{sys_days{*this}.time_since_epoch()};
-return local_days{static_cast<sys_days>(*this).time_since_epoch()}; -@@ -9671,6 +9658,7 @@ private: sys_time<duration> tp_; // exposition only public: + zoned_time(); zoned_time(const zoned_time&) = default; zoned_time& operator=(const zoned_time&) = default; @@ -9734,6 +9722,17 @@ to a validtime_zone
, and represents a point in time that exists and is not ambiguous. ++zoned_time<Duration>::zoned_time(); +++++Effects: Constructs a
+zoned_time
zt
such that +zt.get_time_zone()->name() == "UTC"
, and +zt.get_sys_time() == sys_seconds{}
. +zoned_time<Duration>::zoned_time(const zoned_time&) = default; zoned_time<Duration>& zoned_time<Duration>::operator=(const zoned_time&) = default;