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

This is the documentation for an old version of boost. Click here for the latest Boost documentation.

Struct template eu_dst_trait

boost::date_time::eu_dst_trait — Rules for daylight savings start in the EU (Last Sun in Mar).


template<typename date_type> 
struct eu_dst_trait {
// types
typedef date_type::day_of_week_type day_of_week_type;
typedef date_type::month_type month_type;
typedef date_time::last_kday_of_month< date_type > start_rule_functor;
typedef date_time::last_kday_of_month< date_type > end_rule_functor;

// public static functions
day_of_week_type start_day() ;
month_type start_month() ;
day_of_week_type end_day() ;
month_type end_month() ;
int dst_start_offset_minutes() ;
int dst_end_offset_minutes() ;
int dst_shift_length_minutes() ;


These amount to the following:

  • Start of dst day is last Sunday in March

  • End day of dst is last Sunday in Oct

  • Going forward switch time is 2:00 am (offset 120 minutes)

  • Going back switch time is 3:00 am (off set 180 minutes)

  • Shift duration is one hour (60 minutes)

eu_dst_trait public static functions

  1. day_of_week_type start_day() ;
  2. month_type start_month() ;
  3. day_of_week_type end_day() ;
  4. month_type end_month() ;
  5. int dst_start_offset_minutes() ;
  6. int dst_end_offset_minutes() ;
  7. int dst_shift_length_minutes() ;
Copyright 2001-2005 CrystalClear Software, Inc