Template that simplifies the creation of local time calculator. More...
#include <local_time_adjustor.hpp>
Public Types | |
typedef time_type::time_duration_type | time_duration_type |
typedef time_type::date_type | date_type |
typedef static_local_time_adjustor < time_type, dst_rule, utc_adjustment < time_duration_type, utc_offset > > | dst_adjustor |
Static Public Member Functions | |
static time_type | utc_to_local (const time_type &t) |
Convert a utc time to local time. More... | |
static time_type | local_to_utc (const time_type &t, date_time::dst_flags dst=date_time::calculate) |
Convert a local time to utc. More... | |
Template that simplifies the creation of local time calculator.
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:
typedef time_type::date_type boost::date_time::local_adjustor< time_type, utc_offset, dst_rule >::date_type |
typedef static_local_time_adjustor<time_type, dst_rule, utc_adjustment<time_duration_type, utc_offset> > boost::date_time::local_adjustor< time_type, utc_offset, dst_rule >::dst_adjustor |
typedef time_type::time_duration_type boost::date_time::local_adjustor< time_type, utc_offset, dst_rule >::time_duration_type |
|
inlinestatic |
Convert a local time to utc.
|
inlinestatic |
Convert a utc time to local time.