...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::local_time::custom_time_zone_base — A real time zone.
// In header: <boost/date_time/local_time/custom_time_zone.hpp> template<typename CharT> class custom_time_zone_base : public date_time::time_zone_base< posix_time::ptime, CharT > { public: // types typedef boost::posix_time::time_duration time_duration_type; typedef date_time::time_zone_base< posix_time::ptime, CharT > base_type; typedef base_type::string_type string_type; typedef base_type::stringstream_type stringstream_type; typedef date_time::time_zone_names_base< CharT > time_zone_names; typedef CharT char_type; // construct/copy/destruct custom_time_zone_base(const time_zone_names &, const time_duration_type &, const dst_adjustment_offsets &, boost::shared_ptr< dst_calc_rule >); ~custom_time_zone_base(); // public member functions string_type dst_zone_abbrev() const; string_type std_zone_abbrev() const; string_type dst_zone_name() const; string_type std_zone_name() const; bool has_dst() const; posix_time::ptime dst_local_start_time(gregorian::greg_year) const; posix_time::ptime dst_local_end_time(gregorian::greg_year) const; time_duration_type base_utc_offset() const; time_duration_type dst_offset() const; string_type to_posix_string() const; };
custom_time_zone_base
public member functionsstring_type dst_zone_abbrev() const;
string_type std_zone_abbrev() const;
string_type dst_zone_name() const;
string_type std_zone_name() const;
bool has_dst() const;True if zone uses daylight savings adjustments.
posix_time::ptime dst_local_start_time(gregorian::greg_year y) const;Local time that DST starts <ndash></ndash> NADT if has_dst is false.
posix_time::ptime dst_local_end_time(gregorian::greg_year y) const;Local time that DST ends <ndash></ndash> NADT if has_dst is false.
time_duration_type base_utc_offset() const;Base offset from UTC for zone (eg: -07:30:00)
time_duration_type dst_offset() const;Adjustment forward or back made while DST is in effect.
string_type to_posix_string() const;Returns a POSIX time_zone string for this object.