NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
date::utc_clock Class Reference

#include <tz.h>

Collaboration diagram for date::utc_clock:

Public Types

using duration = std::chrono::system_clock::duration
 
using rep = duration::rep
 
using period = duration::period
 
using time_point = std::chrono::time_point< utc_clock >
 

Public Member Functions

template<class Duration >
utc_time< typename std::common_type< Duration, std::chrono::seconds >::type > from_sys (const sys_time< Duration > &st)
 
template<class Duration >
sys_time< typename std::common_type< Duration, std::chrono::seconds >::type > to_sys (const utc_time< Duration > &ut)
 
template<class Duration >
utc_time< typename std::common_type< Duration, std::chrono::seconds >::type > from_local (const local_time< Duration > &st)
 
template<class Duration >
local_time< typename std::common_type< Duration, std::chrono::seconds >::type > to_local (const utc_time< Duration > &ut)
 

Static Public Member Functions

static time_point now ()
 
template<typename Duration >
static std::chrono::time_point< std::chrono::system_clock, typename std::common_type< Duration, std::chrono::seconds >::type > to_sys (const std::chrono::time_point< utc_clock, Duration > &)
 
template<typename Duration >
static std::chrono::time_point< utc_clock, typename std::common_type< Duration, std::chrono::seconds >::type > from_sys (const std::chrono::time_point< std::chrono::system_clock, Duration > &)
 
template<typename Duration >
static std::chrono::time_point< local_t, typename std::common_type< Duration, std::chrono::seconds >::type > to_local (const std::chrono::time_point< utc_clock, Duration > &)
 
template<typename Duration >
static std::chrono::time_point< utc_clock, typename std::common_type< Duration, std::chrono::seconds >::type > from_local (const std::chrono::time_point< local_t, Duration > &)
 

Static Public Attributes

static CONSTDATA bool is_steady = false
 

Detailed Description

Definition at line 1852 of file tz.h.

Member Typedef Documentation

◆ duration

using date::utc_clock::duration = std::chrono::system_clock::duration

Definition at line 1855 of file tz.h.

◆ period

using date::utc_clock::period = duration::period

Definition at line 1857 of file tz.h.

◆ rep

using date::utc_clock::rep = duration::rep

Definition at line 1856 of file tz.h.

◆ time_point

using date::utc_clock::time_point = std::chrono::time_point<utc_clock>

Definition at line 1858 of file tz.h.

Member Function Documentation

◆ from_local() [1/2]

template<class Duration >
utc_time< typename std::common_type< Duration, std::chrono::seconds >::type > date::utc_clock::from_local ( const local_time< Duration > &  st)

Definition at line 1964 of file tz.h.

References from_sys().

Here is the call graph for this function:

◆ from_local() [2/2]

template<typename Duration >
static std::chrono::time_point< utc_clock, typename std::common_type< Duration, std::chrono::seconds >::type > date::utc_clock::from_local ( const std::chrono::time_point< local_t, Duration > &  )
static

◆ from_sys() [1/2]

template<typename Duration >
static std::chrono::time_point< utc_clock, typename std::common_type< Duration, std::chrono::seconds >::type > date::utc_clock::from_sys ( const std::chrono::time_point< std::chrono::system_clock, Duration > &  )
static

◆ from_sys() [2/2]

template<class Duration >
utc_time< typename std::common_type< Duration, std::chrono::seconds >::type > date::utc_clock::from_sys ( const sys_time< Duration > &  st)

Definition at line 1891 of file tz.h.

References date::get_tzdb(), and date::tzdb::leap_seconds.

Here is the call graph for this function:

◆ now()

utc_clock::time_point date::utc_clock::now ( )
inlinestatic

Definition at line 1957 of file tz.h.

References from_sys().

Referenced by date::tai_clock::now(), and date::gps_clock::now().

Here is the call graph for this function:

◆ to_local() [1/2]

template<typename Duration >
static std::chrono::time_point< local_t, typename std::common_type< Duration, std::chrono::seconds >::type > date::utc_clock::to_local ( const std::chrono::time_point< utc_clock, Duration > &  )
static

◆ to_local() [2/2]

template<class Duration >
local_time< typename std::common_type< Duration, std::chrono::seconds >::type > date::utc_clock::to_local ( const utc_time< Duration > &  ut)

Definition at line 1971 of file tz.h.

References to_sys().

Here is the call graph for this function:

◆ to_sys() [1/2]

template<typename Duration >
static std::chrono::time_point< std::chrono::system_clock, typename std::common_type< Duration, std::chrono::seconds >::type > date::utc_clock::to_sys ( const std::chrono::time_point< utc_clock, Duration > &  )
static

◆ to_sys() [2/2]

template<class Duration >
sys_time< typename std::common_type< Duration, std::chrono::seconds >::type > date::utc_clock::to_sys ( const utc_time< Duration > &  ut)

Definition at line 1944 of file tz.h.

References date::is_leap_second().

Here is the call graph for this function:

Member Data Documentation

◆ is_steady

CONSTDATA bool date::utc_clock::is_steady = false
static

Definition at line 1859 of file tz.h.


The documentation for this class was generated from the following file: