Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Class template local_adjustor

boost::date_time::local_adjustor — Template that simplifies the creation of local time calculator.

Synopsis

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

template<typename time_type,  utc_offset, typename dst_rule> 
class local_adjustor {
public:
  // types
  typedef                                                                        ;
  typedef                                                                                 ;         
  typedef static_local_time_adjustor< dst_rule, utc_adjustment<  ;      

  // public static functions
   (const );
   
  (const ,  = );
};

Description

Use this template to create the timezone to utc convertors as required.

This class will also work for other regions that don't use dst and have a utc offset which is an integral number of hours.

Template Parameters -time_type – Time class to use -utc_offset – Number hours local time is adjust from utc -use_dst – true (default) if region uses dst, false otherwise For example:

   //eastern timezone is utc-5

local_adjustor public static functions

  1.  (const  t);
    Convert a utc time to local time.
  2.  
    (const  t,  dst = );
    Convert a local time to utc.

PrevUpHomeNext