diff --git a/tz.html b/tz.html index abbe4dd..e99a4a4 100644 --- a/tz.html +++ b/tz.html @@ -2339,7 +2339,7 @@ public: using rep = duration::rep; using period = duration::period; using time_point = std::chrono::time_point<utc_clock>; - static constexpr bool is_steady = true; + static constexpr bool is_steady = false; static time_point now() noexcept; }; @@ -2406,8 +2406,10 @@ to_utc_time(tai_time<Duration> t)

-Returns: A utc_time u, such that -to_tai_time(u) == t. +Returns: utc_time<common_type_t<Duration, seconds>>{t.time_since_epoch()} - 378691210s +

+

+Note: 378691210s == sys_days{1970y/jan/1} - sys_days{1958y/jan/1} + 10s

@@ -2418,8 +2420,10 @@ to_utc_time(gps_time<Duration> t)

-Returns: A utc_time u, such that -to_gps_time(u) == t. +Returns: utc_time<common_type_t<Duration, seconds>>{t.time_since_epoch()} + 315964809s +

+

+Note: 315964809s == sys_days{1980y/jan/sun[1]} - sys_days{1970y/jan/1} + 9s

@@ -2451,7 +2455,7 @@ public: using rep = duration::rep; using period = duration::period; using time_point = std::chrono::time_point<tai_clock>; - static constexpr bool is_steady = true; + static constexpr bool is_steady = false; static time_point now() noexcept; }; @@ -2475,7 +2479,7 @@ static tai_clock::time_point tai_clock::now() noexcept;

-Returns: to_tai_time(utc_clock::now()). +Returns: to_tai_time(system_clock::now()).

@@ -2508,8 +2512,10 @@ to_tai_time(utc_time<Duration> u)

-Returns: A tai_time which represents time as measured by -TAI at the same instant as the time t in UTC. +Returns: tai_time<common_type_t<Duration, seconds>>{t.time_since_epoch()} + 378691210s +

+

+Note: 378691210s == sys_days{1970y/jan/1} - sys_days{1958y/jan/1} + 10s

@@ -2520,7 +2526,10 @@ to_tai_time(gps_time<Duration> t)

-Equivalent to: return to_tai_time(to_utc_time(t)). +Returns: tai_time<common_type_t<Duration, seconds>>{t.time_since_epoch()} + 694656019s +

+

+Note: 694656019s == sys_days{1980y/jan/sun[1]} - sys_days{1958y/jan/1} + 19s

@@ -2531,7 +2540,14 @@ operator<<(std::basic_ostream<class CharT, class Traits>& os, co

-Effects: Streams t to os using the format "%F %T". +Effects: Creates a sys_time from t as if by: +

+
+auto tp = sys_time<common_type_t<Duration, seconds>>{t.time_since_epoch()} -
+              (sys_days{1970_y/jan/1} - sys_days{1958_y/jan/1});
+
+

+And then streams that sys_time: os << tp.

Returns: os. @@ -2550,7 +2566,7 @@ public: using rep = duration::rep; using period = duration::period; using time_point = std::chrono::time_point<gps_clock>; - static constexpr bool is_steady = true; + static constexpr bool is_steady = false; static time_point now() noexcept; }; @@ -2564,7 +2580,7 @@ using gps_seconds = gps_time<std::chrono::seconds>;

gps_time counts physical seconds continuously like utc_itme, but when printed out, always has 60 seconds per minute. It's epoch -is 1980-01-06 and was equivalent to UTC at that time. If falls ahead of UTC +is 1980-01-06 and was equivalent to UTC at that time. If drifts ahead of UTC with each inserted leap second. It is always exactly 19s behind TAI.

@@ -2573,7 +2589,7 @@ static gps_clock::time_point gps_clock::now() noexcept;

-Returns: to_gps_time(utc_clock::now()). +Returns: to_gps_time(system_clock::now()).

@@ -2606,8 +2622,10 @@ to_gps_time(utc_time<Duration> u)

-Returns: A gps_time which represents time as measured by -GPS at the same instant as the time t in UTC. +Returns: gps_time<common_type_t<Duration, seconds>>{t.time_since_epoch()} - 315964809s +

+

+Note: 315964809s == sys_days{1980y/jan/sun[1]} - sys_days{1970y/jan/1} + 9s

@@ -2618,7 +2636,10 @@ to_gps_time(tai_time<Duration> t)

-Equivalent to: return to_gps_time(to_utc_time(t)). +Returns: gps_time<common_type_t<Duration, seconds>>{t.time_since_epoch()} - 694656019s +

+

+Note: 694656019s == sys_days{1980y/jan/sun[1]} - sys_days{1958y/jan/1} + 19s

@@ -2629,7 +2650,14 @@ operator<<(std::basic_ostream<class CharT, class Traits>& os, co

-Effects: Streams t to os using the format "%F %T". +Effects: Creates a sys_time from t as if by: +

+
+auto tp = sys_time<common_type_t<Duration, seconds>>{t.time_since_epoch()} +
+              (sys_days{1980y/jan/sun[1]} - sys_days{1970y/jan/1});
+
+

+And then streams that sys_time: os << tp.

Returns: os.