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

#include <tz.h>

Collaboration diagram for date::time_zone:

Public Member Functions

 time_zone (time_zone &&)=default
 
time_zoneoperator= (time_zone &&)=default
 
DATE_API time_zone (const std::string &s, detail::undocumented)
 
const std::string & name () const NOEXCEPT
 
template<class Duration >
sys_info get_info (sys_time< Duration > st) const
 
template<class Duration >
local_info get_info (local_time< Duration > tp) const
 
template<class Duration >
sys_time< typename std::common_type< Duration, std::chrono::seconds >::type > to_sys (local_time< Duration > tp) const
 
template<class Duration >
sys_time< typename std::common_type< Duration, std::chrono::seconds >::type > to_sys (local_time< Duration > tp, choose z) const
 
template<class Duration >
local_time< typename std::common_type< Duration, std::chrono::seconds >::type > to_local (sys_time< Duration > tp) const
 
DATE_API void add (const std::string &s)
 

Private Member Functions

DATE_API sys_info get_info_impl (sys_seconds tp) const
 
DATE_API local_info get_info_impl (local_seconds tp) const
 
template<class Duration >
sys_time< typename std::common_type< Duration, std::chrono::seconds >::type > to_sys_impl (local_time< Duration > tp, choose z, std::false_type) const
 
template<class Duration >
sys_time< typename std::common_type< Duration, std::chrono::seconds >::type > to_sys_impl (local_time< Duration > tp, choose, std::true_type) const
 
DATE_API sys_info get_info_impl (sys_seconds tp, int timezone) const
 
DATE_API void adjust_infos (const std::vector< detail::Rule > &rules)
 
DATE_API void parse_info (std::istream &in)
 

Private Attributes

std::string name_
 
std::vector< detail::zoneletzonelets_
 
std::unique_ptr< std::once_flag > adjusted_
 

Friends

bool operator== (const time_zone &x, const time_zone &y) NOEXCEPT
 
bool operator< (const time_zone &x, const time_zone &y) NOEXCEPT
 
DATE_API std::ostream & operator<< (std::ostream &os, const time_zone &z)
 

Detailed Description

Definition at line 778 of file tz.h.

Constructor & Destructor Documentation

◆ time_zone() [1/2]

date::time_zone::time_zone ( time_zone &&  )
default

◆ time_zone() [2/2]

time_zone::time_zone ( const std::string &  s,
detail::undocumented   
)
explicit

Definition at line 2231 of file tz.cpp.

References name_, parse_info(), and zonelets_.

Here is the call graph for this function:

Member Function Documentation

◆ add()

void time_zone::add ( const std::string &  s)

Definition at line 2284 of file tz.cpp.

References parse_info(), and zonelets_.

Here is the call graph for this function:

◆ adjust_infos()

void time_zone::adjust_infos ( const std::vector< detail::Rule > &  rules)
private

◆ get_info() [1/2]

template<class Duration >
local_info time_zone::get_info ( local_time< Duration >  tp) const
inline

Definition at line 893 of file tz.h.

References get_info_impl().

Here is the call graph for this function:

◆ get_info() [2/2]

template<class Duration >
sys_info time_zone::get_info ( sys_time< Duration >  st) const
inline

Definition at line 885 of file tz.h.

References get_info_impl().

Referenced by to_local(), and to_sys_impl().

Here is the call graph for this function:

◆ get_info_impl() [1/3]

local_info time_zone::get_info_impl ( local_seconds  tp) const
private

Definition at line 2259 of file tz.cpp.

References date::local_info::ambiguous, date::local_info::first, get_info_impl(), and date::local_info::nonexistent.

Here is the call graph for this function:

◆ get_info_impl() [2/3]

sys_info time_zone::get_info_impl ( sys_seconds  tp) const
private

Definition at line 2253 of file tz.cpp.

References get_info_impl().

Referenced by get_info(), and get_info_impl().

Here is the call graph for this function:

◆ get_info_impl() [3/3]

sys_info time_zone::get_info_impl ( sys_seconds  tp,
int  timezone 
) const
private

Definition at line 2507 of file tz.cpp.

References adjust_infos(), adjusted_, date::get_tzdb(), date::max_year, date::min_year, date::year_month_day::year(), and zonelets_.

Here is the call graph for this function:

◆ name()

const std::string & time_zone::name ( ) const
inline

Definition at line 877 of file tz.h.

References name_.

◆ operator=()

time_zone & date::time_zone::operator= ( time_zone &&  )
default

◆ parse_info()

void time_zone::parse_info ( std::istream &  in)
private

Definition at line 2304 of file tz.cpp.

References date::detail::MonthDayTime::canonicalize(), date::detail::zonelet::format_, date::detail::zonelet::gmtoff_, date::year::max(), date::max_day, date::max_year, date::min_year, date::parse_signed_time(), date::detail::zonelet::U::rule_, date::detail::zonelet::u, date::detail::zonelet::until_date_, date::detail::zonelet::until_year_, and zonelets_.

Referenced by add(), and time_zone().

Here is the call graph for this function:

◆ to_local()

template<class Duration >
local_time< typename std::common_type< Duration, std::chrono::seconds >::type > time_zone::to_local ( sys_time< Duration >  tp) const
inline

Definition at line 917 of file tz.h.

References get_info().

Here is the call graph for this function:

◆ to_sys() [1/2]

template<class Duration >
sys_time< typename std::common_type< Duration, std::chrono::seconds >::type > time_zone::to_sys ( local_time< Duration >  tp) const
inline

Definition at line 901 of file tz.h.

References to_sys_impl().

Referenced by adjust_infos().

Here is the call graph for this function:

◆ to_sys() [2/2]

template<class Duration >
sys_time< typename std::common_type< Duration, std::chrono::seconds >::type > time_zone::to_sys ( local_time< Duration >  tp,
choose  z 
) const
inline

Definition at line 909 of file tz.h.

References to_sys_impl().

Here is the call graph for this function:

◆ to_sys_impl() [1/2]

template<class Duration >
sys_time< typename std::common_type< Duration, std::chrono::seconds >::type > time_zone::to_sys_impl ( local_time< Duration >  tp,
choose  z,
std::false_type   
) const
private

Definition at line 934 of file tz.h.

References date::local_info::ambiguous, get_info(), date::latest, and date::local_info::nonexistent.

Referenced by to_sys().

Here is the call graph for this function:

◆ to_sys_impl() [2/2]

template<class Duration >
sys_time< typename std::common_type< Duration, std::chrono::seconds >::type > time_zone::to_sys_impl ( local_time< Duration >  tp,
choose  ,
std::true_type   
) const
private

Definition at line 951 of file tz.h.

References date::local_info::ambiguous, get_info(), and date::local_info::nonexistent.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator<

bool operator< ( const time_zone x,
const time_zone y 
)
friend

Definition at line 925 of file tz.h.

◆ operator<<

DATE_API std::ostream & operator<< ( std::ostream &  os,
const time_zone z 
)
friend

Definition at line 2569 of file tz.cpp.

◆ operator==

bool operator== ( const time_zone x,
const time_zone y 
)
friend

Definition at line 924 of file tz.h.

Member Data Documentation

◆ adjusted_

std::unique_ptr<std::once_flag> date::time_zone::adjusted_
private

Definition at line 788 of file tz.h.

Referenced by get_info_impl().

◆ name_

std::string date::time_zone::name_
private

Definition at line 781 of file tz.h.

Referenced by adjust_infos(), name(), and time_zone().

◆ zonelets_

std::vector<detail::zonelet> date::time_zone::zonelets_
private

Definition at line 786 of file tz.h.

Referenced by add(), adjust_infos(), get_info_impl(), parse_info(), and time_zone().


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