Re: [Boost-bugs] [Boost C++ Libraries] #3336: utc offset calculated wrong

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3336: utc offset calculated wrong
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-01-19 11:18:14

#3336: utc offset calculated wrong
  Reporter: silvan@… | Owner: az_sw_dude
      Type: Bugs | Status: new
 Milestone: Boost 1.40.0 | Component: date_time
   Version: Boost 1.44.0 | Severity: Problem
Resolution: | Keywords:

Comment (by Alexey Spiridonov <bstbg.20.lesha@…>):

 Just got bitten by the same bug. Correct behavior:

 $ export TZ="PST-8PDT,M3.2.0,M11.1.0"; date -d_at_1383465600
 Sun Nov 3 16:00:00 PST 2013

 posix_time_zone maps the same timestamp with the same timezone string to
 "Sun Nov 3 01:00:00 PST 2013" (16 hours - 1 DST adjustment). Here's
 another (currently working) link to the POSIX RFC that boost::local_time
 purports to implement:

 The relevant text is at the end of page 2, beginning of page 3.

 The boost::local_time documentation and code are both written assuming "-"
 means "west of Greenwich" and "+" means "east of Greenwich", but the
 standard clearly states otherwise.

 Flipping the sign is pretty easy (I can send a patch, even), but I'm not
 sure what's Boost's preferred approach for fixing such errors. The flip
 would break code that depends on the currently broken behavior.

 If it's not appropriate to fix the bug in the current API,
 posix_time_zone2 might be introduced that has the correct sign. Does
 anybody see other approaches?

Ticket URL: <>
Boost C++ Libraries <>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:15 UTC