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

#include <ptz.h>

Collaboration diagram for Posix::time_zone:

Public Member Functions

 time_zone (const detail::string_t &name)
 
template<class Duration >
date::sys_info get_info (date::sys_time< Duration > st) const
 
template<class Duration >
date::local_info get_info (date::local_time< Duration > tp) const
 
template<class Duration >
date::sys_time< typename std::common_type< Duration, std::chrono::seconds >::type > to_sys (date::local_time< Duration > tp) const
 
template<class Duration >
date::sys_time< typename std::common_type< Duration, std::chrono::seconds >::type > to_sys (date::local_time< Duration > tp, date::choose z) const
 
template<class Duration >
date::local_time< typename std::common_type< Duration, std::chrono::seconds >::type > to_local (date::sys_time< Duration > tp) const
 
const time_zoneoperator-> () const
 
std::string name () const
 

Private Member Functions

date::sys_seconds get_start (date::year y) const
 
date::sys_seconds get_prev_start (date::year y) const
 
date::sys_seconds get_next_start (date::year y) const
 
date::sys_seconds get_end (date::year y) const
 
date::sys_seconds get_prev_end (date::year y) const
 
date::sys_seconds get_next_end (date::year y) const
 
date::sys_info contant_offset () const
 

Private Attributes

std::string std_abbrev_
 
std::string dst_abbrev_ = {}
 
std::chrono::seconds offset_
 
std::chrono::seconds save_ = std::chrono::hours{1}
 
detail::rule start_rule_
 
detail::rule end_rule_
 

Friends

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

Detailed Description

Definition at line 236 of file ptz.h.

Constructor & Destructor Documentation

◆ time_zone()

time_zone::time_zone ( const detail::string_t name)
inlineexplicit

Definition at line 343 of file ptz.h.

References dst_abbrev_, end_rule_, offset_, Posix::detail::read_date(), Posix::detail::read_name(), Posix::detail::read_signed_time(), save_, start_rule_, std_abbrev_, and Posix::detail::throw_invalid().

Here is the call graph for this function:

Member Function Documentation

◆ contant_offset()

date::sys_info time_zone::contant_offset ( ) const
private

Definition at line 326 of file ptz.h.

References date::December, date::January, max, min, offset_, and std_abbrev_.

Referenced by get_info().

◆ get_end()

date::sys_seconds time_zone::get_end ( date::year  y) const
inlineprivate

Definition at line 306 of file ptz.h.

References end_rule_, offset_, and save_.

Referenced by get_info().

◆ get_info() [1/2]

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

Definition at line 456 of file ptz.h.

References date::ceil(), contant_offset(), date::December, dst_abbrev_, date::floor(), get_end(), get_info(), get_next_end(), get_next_start(), get_prev_end(), get_prev_start(), get_start(), date::January, offset_, Posix::detail::rule::ok(), save_, start_rule_, and std_abbrev_.

Here is the call graph for this function:

◆ get_info() [2/2]

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

Definition at line 380 of file ptz.h.

References date::ceil(), contant_offset(), date::December, dst_abbrev_, date::floor(), get_end(), get_next_end(), get_next_start(), get_prev_end(), get_prev_start(), get_start(), date::January, offset_, Posix::detail::rule::ok(), save_, start_rule_, and std_abbrev_.

Referenced by get_info(), to_local(), and to_sys().

Here is the call graph for this function:

◆ get_next_end()

date::sys_seconds time_zone::get_next_end ( date::year  y) const
inlineprivate

Definition at line 320 of file ptz.h.

References end_rule_, offset_, and save_.

Referenced by get_info().

◆ get_next_start()

date::sys_seconds time_zone::get_next_start ( date::year  y) const
inlineprivate

Definition at line 299 of file ptz.h.

References offset_, and start_rule_.

Referenced by get_info().

◆ get_prev_end()

date::sys_seconds time_zone::get_prev_end ( date::year  y) const
inlineprivate

Definition at line 313 of file ptz.h.

References end_rule_, offset_, and save_.

Referenced by get_info().

◆ get_prev_start()

date::sys_seconds time_zone::get_prev_start ( date::year  y) const
inlineprivate

Definition at line 292 of file ptz.h.

References offset_, and start_rule_.

Referenced by get_info().

◆ get_start()

date::sys_seconds time_zone::get_start ( date::year  y) const
inlineprivate

Definition at line 285 of file ptz.h.

References offset_, and start_rule_.

Referenced by get_info().

◆ name()

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

Definition at line 588 of file ptz.h.

References dst_abbrev_, end_rule_, offset_, Posix::detail::rule::ok(), save_, start_rule_, std_abbrev_, and Posix::detail::rule::to_string().

Here is the call graph for this function:

◆ operator->()

const time_zone * Posix::time_zone::operator-> ( ) const
inline

Definition at line 267 of file ptz.h.

◆ to_local()

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

Definition at line 566 of file ptz.h.

References get_info().

Here is the call graph for this function:

◆ to_sys() [1/2]

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

Definition at line 530 of file ptz.h.

References get_info().

Here is the call graph for this function:

◆ to_sys() [2/2]

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

Definition at line 546 of file ptz.h.

References get_info().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 576 of file ptz.h.

◆ operator==

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

Definition at line 635 of file ptz.h.

Member Data Documentation

◆ dst_abbrev_

std::string Posix::time_zone::dst_abbrev_ = {}
private

Definition at line 239 of file ptz.h.

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

◆ end_rule_

detail::rule Posix::time_zone::end_rule_
private

Definition at line 243 of file ptz.h.

Referenced by get_end(), get_next_end(), get_prev_end(), name(), and time_zone().

◆ offset_

std::chrono::seconds Posix::time_zone::offset_
private

◆ save_

std::chrono::seconds Posix::time_zone::save_ = std::chrono::hours{1}
private

Definition at line 241 of file ptz.h.

Referenced by get_end(), get_info(), get_next_end(), get_prev_end(), name(), and time_zone().

◆ start_rule_

detail::rule Posix::time_zone::start_rule_
private

Definition at line 242 of file ptz.h.

Referenced by get_info(), get_next_start(), get_prev_start(), get_start(), name(), and time_zone().

◆ std_abbrev_

std::string Posix::time_zone::std_abbrev_
private

Definition at line 238 of file ptz.h.

Referenced by contant_offset(), get_info(), name(), and time_zone().


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