Boost logo

Boost Testing :

From: Jeff Garland (jeff_at_[hidden])
Date: 2005-03-11 22:33:19


On Fri, 11 Mar 2005 16:16:15 -0600, Stephen W. Carson wrote
> Rene Rivera wrote:
>
> > And the time on the upload is:
> >
> > 3/11/2005 3:43:00 AM (I'm guessing that's GMT also).
>
> I wouldn't think this was GMT. I remember noting that tests
> finished around that time this morning St. Louis time, which is -5
> or -6 GMT depending on daylight savings time if I remember correctly.

Hmm -- maybe some date-time helping hand?

St Louis TzInfo:
  Zone name long(DST): Central Daylight Time
  Zone name long(no dst): Central Standard Time
  Zone Abbrev (DST): CDT
  Zone Abbrev (no DST): CST
  Base offset from UTC: -6:00:00
  DST change offseet: 01:00:00
  Daylight Savings Starts: 2005-Apr-03 02:00:00
  Daylight Savings Ends: 2005-Oct-30 02:00:00

Sorry, couldn't resist :^)

Only bad news was I had to add a record for St. Louis to the tz database --
otherwise generated from current CVS code. Anyway, thx, this will make a nice
bit of example code for new features.

Jeff

__________________________________________________________

int main()
{
  using namespace boost::local_time;
  
  tz_database tz_db;
  tz_db.load_from_file("date_time_zonespec.csv");
  boost::shared_ptr<time_zone_base> stl_tz =
tz_db.time_zone_from_region("America/St_Louis");

  if (stl_tz)
  {
    std::cout << "St Louis TzInfo: \n"
              << " Zone name long(DST): "
              << stl_tz->dst_zone_name() << "\n"
              << " Zone name long(no dst): "
              << stl_tz->std_zone_name() << "\n"
              << " Zone Abbrev (DST): "
              << stl_tz->dst_zone_abbrev() << "\n"
              << " Zone Abbrev (no DST): "
              << stl_tz->std_zone_abbrev() << "\n"
              << " Base offset from UTC: "
              << stl_tz->base_utc_offset() << "\n"
              << " DST change offseet: "
              << stl_tz->dst_offset() << "\n"
              << " Daylight Savings Starts: "
              << stl_tz->dst_local_start_time(2005) << "\n"
              << " Daylight Savings Ends: "
              << stl_tz->dst_local_end_time(2005) << "\n";
  }
  return 0;
}


Boost-testing list run by mbergal at meta-comm.com