Home | Libraries | People | FAQ | More |
boost::date_time::dst_calculator — Dynamic class used to caluclate dst transition information.
template<typename date_type_, typename time_duration_type_> class dst_calculator { public: // types typedef time_duration_type_ time_duration_type; typedef date_type_ date_type; // public static functions time_is_dst_result process_local_dst_start_day(const time_duration_type &, unsigned int, long) ; time_is_dst_result process_local_dst_end_day(const time_duration_type &, unsigned int, long) ; time_is_dst_result local_is_dst(const date_type &, const time_duration_type &, const date_type &, const time_duration_type &, const date_type &, const time_duration_type &, const time_duration_type &) ; time_is_dst_result local_is_dst(const date_type &, const time_duration_type &, const date_type &, unsigned int, const date_type &, unsigned int, long) ; };
dst_calculator
public static functionstime_is_dst_result process_local_dst_start_day(const time_duration_type & time_of_day, unsigned int dst_start_offset_minutes, long dst_length_minutes) ;
On this dst transition, the time label between the transition boundary and the boudary + the offset are invalid times. If before the boundary then still not in dst.
Parameters
Number of minutes to adjust clock forward
Local day offset for start of dst
Time offset in the day for the local time
time_is_dst_result process_local_dst_end_day(const time_duration_type & time_of_day, unsigned int dst_end_offset_minutes, long dst_length_minutes) ;
This is the calculation for the DST end day. On that day times prior to the conversion time - dst_length (1 am in US) are still in dst. Times between the above and the switch time are ambiguous. Times after the start_offset are not in dst.
Parameters
Local time of day for end of dst
Time offset in the day for the local time
time_is_dst_result local_is_dst(const date_type & current_day, const time_duration_type & time_of_day, const date_type & dst_start_day, const time_duration_type & dst_start_offset, const date_type & dst_end_day, const time_duration_type & dst_end_offset, const time_duration_type & dst_length_minutes) ;
Determines if the time is really in DST or not. Also checks for invalid and ambiguous.
Parameters
The day to check for dst
Ending day of dst for the given locality
Time offset within day given in dst for dst boundary
Starting day of dst for the given locality
Time offset within day for dst boundary
Time offset within the day to check
time_is_dst_result local_is_dst(const date_type & current_day, const time_duration_type & time_of_day, const date_type & dst_start_day, unsigned int dst_start_offset_minutes, const date_type & dst_end_day, unsigned int dst_end_offset_minutes, long dst_length_minutes) ;
Determines if the time is really in DST or not. Also checks for invalid and ambiguous.
Parameters
The day to check for dst
Ending day of dst for the given locality
Offset within day given in dst for dst boundary (eg 120 for US which is 02:00:00)
Length of dst adjusment (eg: 60 for US)
Starting day of dst for the given locality
Offset within day for dst boundary (eg 120 for US which is 02:00:00)
Time offset within the day to check
Copyright © 2001-2005 CrystalClear Software, Inc |