boost and 2007 US DST change

Hi, I'm trying to evaluate whether some applications which use Boost are exposed to problems with the change to the start and end dates of Daylight Saving Time in the US this year (http://en.wikipedia.org/wiki/Energy_Policy_Act_of_2005#Change_to_daylight_sa...).
From an initial inspection, it seems there are at least two areas which may cause incorrect behaviour after the change is made:
- There is a deprecated template class boost::date_time::us_dst_rules (http://www.boost.org/boost/date_time/dst_rules.hpp) which hard-codes the rules for US DST changes. Admittedly this class is deprecated, but it remains in the code base. - Boost ships with a database of timezone and DST information in CSV format. This appears to contain the old dates for the DST changeover as reported here http://sourceforge.net/tracker/index.php?func=detail&aid=1478619&group_id=7586&atid=207586. Does the above seem right? Also, have these problems been fixed in the upcoming 1.34 release? From a quick scan of CVS it seems not. I'd also be grateful if people could comment on any other areas within Boost that could be problematic, if any. Lastly I wonder if it's worth perhaps summarising this on the Boost site somewhere so that it's easier for others to find the information. Thanks in advance, Graham -- Graham Bennett

Graham Bennett wrote:
Hi,
I'm trying to evaluate whether some applications which use Boost are exposed to problems with the change to the start and end dates of Daylight Saving Time in the US this year (http://en.wikipedia.org/wiki/Energy_Policy_Act_of_2005#Change_to_daylight_sa...).
From an initial inspection, it seems there are at least two areas which may cause incorrect behaviour after the change is made:
- There is a deprecated template class boost::date_time::us_dst_rules (http://www.boost.org/boost/date_time/dst_rules.hpp) which hard-codes the rules for US DST changes. Admittedly this class is deprecated, but it remains in the code base.
True -- it should be updated as I know there are some users.
- Boost ships with a database of timezone and DST information in CSV format. This appears to contain the old dates for the DST changeover as reported here http://sourceforge.net/tracker/index.php?func=detail&aid=1478619&group_id=7586&atid=207586.
Does the above seem right? Also, have these problems been fixed in the upcoming 1.34 release? From a quick scan of CVS it seems not.
Nope, see other recent post on this topic.
I'd also be grateful if people could comment on any other areas within Boost that could be problematic, if any.
Lastly I wonder if it's worth perhaps summarising this on the Boost site somewhere so that it's easier for others to find the information.
It should probably go in the date-time docs and the 1.34 release notes -- care to write a summary blurb? Jeff

On Wed, Jan 10, 2007 at 08:19:57AM -0700, Jeff Garland wrote:
Graham Bennett wrote:
Hi,
I'm trying to evaluate whether some applications which use Boost are exposed to problems with the change to the start and end dates of Daylight Saving Time in the US this year (http://en.wikipedia.org/wiki/Energy_Policy_Act_of_2005#Change_to_daylight_sa...).
From an initial inspection, it seems there are at least two areas which may cause incorrect behaviour after the change is made:
- There is a deprecated template class boost::date_time::us_dst_rules (http://www.boost.org/boost/date_time/dst_rules.hpp) which hard-codes the rules for US DST changes. Admittedly this class is deprecated, but it remains in the code base.
True -- it should be updated as I know there are some users.
Ok, I'll have a go at making a patch.
- Boost ships with a database of timezone and DST information in CSV format. This appears to contain the old dates for the DST changeover as reported here http://sourceforge.net/tracker/index.php?func=detail&aid=1478619&group_id=7586&atid=207586.
Does the above seem right? Also, have these problems been fixed in the upcoming 1.34 release? From a quick scan of CVS it seems not.
Nope, see other recent post on this topic.
I'd also be grateful if people could comment on any other areas within Boost that could be problematic, if any.
Lastly I wonder if it's worth perhaps summarising this on the Boost site somewhere so that it's easier for others to find the information.
It should probably go in the date-time docs and the 1.34 release notes -- care to write a summary blurb?
I'll try to send this along with the patch. cheers, Graham

Graham Bennett wrote:
On Wed, Jan 10, 2007 at 08:19:57AM -0700, Jeff Garland wrote:
Graham Bennett wrote:
Hi,
I'm trying to evaluate whether some applications which use Boost are exposed to problems with the change to the start and end dates of Daylight Saving Time in the US this year (http://en.wikipedia.org/wiki/Energy_Policy_Act_of_2005#Change_to_daylight_sa...).
From an initial inspection, it seems there are at least two areas which may cause incorrect behaviour after the change is made:
- There is a deprecated template class boost::date_time::us_dst_rules (http://www.boost.org/boost/date_time/dst_rules.hpp) which hard-codes the rules for US DST changes. Admittedly this class is deprecated, but it remains in the code base. True -- it should be updated as I know there are some users.
Ok, I'll have a go at making a patch.
Great, thx!
- Boost ships with a database of timezone and DST information in CSV format. This appears to contain the old dates for the DST changeover as reported here http://sourceforge.net/tracker/index.php?func=detail&aid=1478619&group_id=7586&atid=207586.
Does the above seem right? Also, have these problems been fixed in the upcoming 1.34 release? From a quick scan of CVS it seems not. Nope, see other recent post on this topic.
I'd also be grateful if people could comment on any other areas within Boost that could be problematic, if any.
Lastly I wonder if it's worth perhaps summarising this on the Boost site somewhere so that it's easier for others to find the information. It should probably go in the date-time docs and the 1.34 release notes -- care to write a summary blurb?
I'll try to send this along with the patch.
Ditto -- although just a text writeup will probably do as I'll integrate it with the docs. Jeff

On Wed, Jan 10, 2007 at 02:41:55PM -0700, Jeff Garland wrote:
Ok, I'll have a go at making a patch.
Great, thx!
Patch attached along with a simple test. Please take a look and see if it makes sense.
I'll try to send this along with the patch.
Ditto -- although just a text writeup will probably do as I'll integrate it with the docs.
Here's an attempt: --- The date_time library is affected by the change to the start and end dates of US Daylight Saving Time in 2007 (http://en.wikipedia.org/wiki/Energy_Policy_Act_of_2005#Change_to_daylight_sa...). - There is a deprecated template class boost::date_time::us_dst_rules which hard-codes the date for US DST changes. Ideally code using this should be remediated, but a patch is available. Since the logic is in inline template code, all components which use it will have to be rebuilt to ensure the change is picked up. - Boost ships with a user-editable database of timezone and DST information (libs/date_time/data/date_time_zonespec.csv) which needs to be updated. --- cheers, Graham -- Graham Bennett
participants (2)
-
Graham Bennett
-
Jeff Garland