Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards


Class template time_zone_names_base

boost::date_time::time_zone_names_base — Base type that holds various string names for timezone output.


// In header: <boost/date_time/time_zone_names.hpp>

template<typename CharT> 
class time_zone_names_base {
  // types
  typedef std::basic_string< CharT > string_type;

  // construct/copy/destruct
  time_zone_names_base(const string_type &, const string_type &, 
                       const string_type &, const string_type &);

  // 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;


Class that holds various types of strings used for timezones. For example, for the western United States there is the full name: Pacific Standard Time and the abbreviated name: PST. During daylight savings there are additional names: Pacific Daylight Time and PDT.

Template Parameters

  1. typename CharT

    Allows class to support different character types

time_zone_names_base public construct/copy/destruct

  1. time_zone_names_base();
  2. time_zone_names_base(const string_type & std_zone_name_str, 
                         const string_type & std_zone_abbrev_str, 
                         const string_type & dst_zone_name_str, 
                         const string_type & dst_zone_abbrev_str);

time_zone_names_base public member functions

  1. string_type dst_zone_abbrev() const;
  2. string_type std_zone_abbrev() const;
  3. string_type dst_zone_name() const;
  4. string_type std_zone_name() const;