boost.png (6897 bytes) Home Libraries People FAQ More

PrevUpHomeNext

Class template time_zone_base

boost::date_time::time_zone_base — Interface class for dynamic time zones.

Synopsis

template<typename time_type, typename CharT = char> 
class time_zone_base {
public:
  // types
  typedef std::basic_string< CharT >       string_type;       
  typedef std::basic_stringstream< CharT > stringstream_type; 
  typedef time_type::date_type::year_type  year_type;         
  typedef time_type::time_duration_type    time_duration_type;

  // construct/copy/destruct
  time_zone_base();
  ~time_zone_base();

  // public member functions
  virtual string_type dst_zone_abbrev() const;
  virtual string_type std_zone_abbrev() const;
  virtual string_type dst_zone_name() const;
  virtual string_type std_zone_name() const;
  virtual bool has_dst() const;
  virtual time_type dst_local_start_time(year_type) const;
  virtual time_type dst_local_end_time(year_type) const;
  virtual time_duration_type base_utc_offset() const;
  virtual time_duration_type dst_offset() const;
  virtual string_type to_posix_string() const;
};

Description

This class represents the base interface for all timezone representations. Subclasses may provide different systems for identifying a particular zone. For example some may provide a geographical based zone construction while others may specify the offset from GMT. Another possible implementation would be to convert from POSIX timezone strings. Regardless of the construction technique, this is the interface that these time zone types must provide.

Note that this class is intended to be used as a shared resource (hence the derivation from boost::counted_base.

time_zone_base construct/copy/destruct

  1. time_zone_base();
  2. ~time_zone_base();

time_zone_base public member functions

  1. virtual string_type dst_zone_abbrev() const;
  2. virtual string_type std_zone_abbrev() const;
  3. virtual string_type dst_zone_name() const;
  4. virtual string_type std_zone_name() const;
  5. virtual bool has_dst() const;
  6. virtual time_type dst_local_start_time(year_type y) const;
  7. virtual time_type dst_local_end_time(year_type y) const;
  8. virtual time_duration_type base_utc_offset() const;
  9. virtual time_duration_type dst_offset() const;
  10. virtual string_type to_posix_string() const;
Copyright © 2001-2005 CrystalClear Software, Inc

PrevUpHomeNext