![]() |
Home | Libraries | People | FAQ | More |
boost::local_time::posix_time_zone_base — A time zone class constructed from a POSIX time zone string.
// In header: <boost/date_time/local_time/posix_time_zone.hpp> template<typename CharT> class posix_time_zone_base : public { public: // types typedef ; typedef ; typedef ; typedef ; typedef ; typedef ; typedef ; typedef ; typedef ; // construct/copy/destruct (); ~(); // public member functions () ; () ; () ; () ; () ; () ; () ; () ; () ; () ; // private member functions (); (, ); (, ); (, ); (, ); // private static functions (); };
A POSIX time zone string takes the form of:
"std offset dst [offset],start[/time],end[/time]" (w/no spaces) 'std' specifies the abbrev of the time zone.
'offset' is the offset from UTC.
'dst' specifies the abbrev of the time zone during daylight savings time.
The second offset is how many hours changed during DST. Default=1
'start' and'end' are the dates when DST goes into (and out of) effect.
'offset' takes the form of: [+|-]hh[:mm[:ss]] {h=0-23, m/s=0-59}
'time' and 'offset' take the same form. Time defaults=02:00:00
'start' and 'end' can be one of three forms:
Mm.w.d {month=1-12, week=1-5 (5 is always last), day=0-6}
Jn {n=1-365 Feb29 is never counted}
n {n=0-365 Feb29 is counted in leap years}
Example "PST-5PDT01:00:00,M4.1.0/02:00:00,M10.1.0/02:00:00"
Exceptions will be thrown under these conditions:
An invalid date spec (see date class)
A boost::local_time::bad_offset exception will be thrown for:
A DST start or end offset that is negative or more than 24 hours
A UTC zone that is greater than +14 or less than -12 hours
A boost::local_time::bad_adjustment exception will be thrown for:
A DST adjustment that is 24 hours or more (positive or negative)
Note that UTC zone offsets can be greater than +12: http://www.worldtimezone.com/utc/utc+1200.html
posix_time_zone_base
public member functions() ;String for the zone when not in daylight savings (eg: EST)
() ;String for the timezone when in daylight savings (eg: EDT)
For those time zones that have no DST, an empty string is used
() ;String for the zone when not in daylight savings (eg: Eastern Standard Time)
The full STD name is not extracted from the posix time zone string. Therefore, the STD abbreviation is used in it's place
() ;String for the timezone when in daylight savings (eg: Eastern Daylight Time)
The full DST name is not extracted from the posix time zone string. Therefore, the STD abbreviation is used in it's place. For time zones that have no DST, an empty string is used
() ;True if zone uses daylight savings adjustments otherwise false.
( y) ;Local time that DST starts – NADT if has_dst is false.
( y) ;Local time that DST ends – NADT if has_dst is false.
() ;Base offset from UTC for zone (eg: -07:30:00)
() ;Adjustment forward or back made while DST is in effect.
() ;Returns a POSIX time_zone string for this object.
posix_time_zone_base
private member functions( obj);
Extract time zone abbreviations for STD & DST as well as the offsets for the time shift that occurs and how much of a shift. At this time full time zone names are NOT extracted so the abbreviations are used in their place
( start, end);
( s, e);
( s, e);Julian day. Feb29 is never counted, even in leap years.
( s, e);Julian day. Feb29 is always counted, but exception thrown in non-leap years.