forked from HowardHinnant/date
Add convenience converts among sys_time, utc_time, tai_time, and gps_time.
This commit is contained in:
70
tz.html
70
tz.html
@@ -26,7 +26,7 @@
|
|||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
<a href="mailto:howard.hinnant@gmail.com">Howard E. Hinnant</a><br/>
|
<a href="mailto:howard.hinnant@gmail.com">Howard E. Hinnant</a><br/>
|
||||||
2016-06-07<br/>
|
2016-06-08<br/>
|
||||||
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"> <img alt="Creative
|
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"> <img alt="Creative
|
||||||
Commons License" style="border-width:0"
|
Commons License" style="border-width:0"
|
||||||
src="http://i.creativecommons.org/l/by/4.0/80x15.png" /></a><br /> This work is licensed
|
src="http://i.creativecommons.org/l/by/4.0/80x15.png" /></a><br /> This work is licensed
|
||||||
@@ -2695,6 +2695,74 @@ operator<<(std::basic_ostream<class CharT, class Traits>& os, co
|
|||||||
</p>
|
</p>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
|
<p><b>Convenience converters</b></p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
template <class Duration>
|
||||||
|
sys_time<typename std::common_type<Duration, std::chrono::seconds>::type>
|
||||||
|
to_sys_time(tai_time<Duration> t)
|
||||||
|
</pre>
|
||||||
|
<blockquote>
|
||||||
|
<p>
|
||||||
|
<i>Returns:</i> <code>to_sys_time(to_utc_time(t))</code>.
|
||||||
|
</p>
|
||||||
|
</blockquote>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
template <class Duration>
|
||||||
|
sys_time<typename std::common_type<Duration, std::chrono::seconds>::type>
|
||||||
|
to_sys_time(gps_time<Duration> t)
|
||||||
|
</pre>
|
||||||
|
<blockquote>
|
||||||
|
<p>
|
||||||
|
<i>Returns:</i> <code>to_sys_time(to_utc_time(t))</code>.
|
||||||
|
</p>
|
||||||
|
</blockquote>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
template <class Duration>
|
||||||
|
tai_time<typename std::common_type<Duration, std::chrono::seconds>::type>
|
||||||
|
to_tai_time(sys_time<Duration> t)
|
||||||
|
</pre>
|
||||||
|
<blockquote>
|
||||||
|
<p>
|
||||||
|
<i>Returns:</i> <code>to_tai_time(to_utc_time(t))</code>.
|
||||||
|
</p>
|
||||||
|
</blockquote>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
template <class Duration>
|
||||||
|
tai_time<typename std::common_type<Duration, std::chrono::seconds>::type>
|
||||||
|
to_tai_time(gps_time<Duration> t)
|
||||||
|
</pre>
|
||||||
|
<blockquote>
|
||||||
|
<p>
|
||||||
|
<i>Returns:</i> <code>to_tai_time(to_utc_time(t))</code>.
|
||||||
|
</p>
|
||||||
|
</blockquote>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
template <class Duration>
|
||||||
|
gps_time<typename std::common_type<Duration, std::chrono::seconds>::type>
|
||||||
|
to_gps_time(sys_time<Duration> t)
|
||||||
|
</pre>
|
||||||
|
<blockquote>
|
||||||
|
<p>
|
||||||
|
<i>Returns:</i> <code>to_gps_time(to_utc_time(t))</code>.
|
||||||
|
</p>
|
||||||
|
</blockquote>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
template <class Duration>
|
||||||
|
gps_time<typename std::common_type<Duration, std::chrono::seconds>::type>
|
||||||
|
to_gps_time(tai_time<Duration> t)
|
||||||
|
</pre>
|
||||||
|
<blockquote>
|
||||||
|
<p>
|
||||||
|
<i>Returns:</i> <code>to_gps_time(to_utc_time(t))</code>.
|
||||||
|
</p>
|
||||||
|
</blockquote>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
[<i>Example:</i>
|
[<i>Example:</i>
|
||||||
</p>
|
</p>
|
||||||
|
Reference in New Issue
Block a user