Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56545 - in branches/release/boost/date_time: . local_time
From: andrey.semashev_at_[hidden]
Date: 2009-10-03 06:04:00


Author: andysem
Date: 2009-10-03 06:04:00 EDT (Sat, 03 Oct 2009)
New Revision: 56545
URL: http://svn.boost.org/trac/boost/changeset/56545

Log:
Fixes #1861, #2213 merged from trunk.
Text files modified:
   branches/release/boost/date_time/local_time/posix_time_zone.hpp | 9 ++++++---
   branches/release/boost/date_time/time_facet.hpp | 2 +-
   2 files changed, 7 insertions(+), 4 deletions(-)

Modified: branches/release/boost/date_time/local_time/posix_time_zone.hpp
==============================================================================
--- branches/release/boost/date_time/local_time/posix_time_zone.hpp (original)
+++ branches/release/boost/date_time/local_time/posix_time_zone.hpp 2009-10-03 06:04:00 EDT (Sat, 03 Oct 2009)
@@ -59,9 +59,12 @@
    * An invalid date spec (see date class)<br>
    * A boost::local_time::bad_offset exception will be thrown for:<br>
    * A DST start or end offset that is negative or more than 24 hours<br>
- * A UTC zone that is greater than +12 or less than -12 hours<br>
+ * A UTC zone that is greater than +14 or less than -12 hours<br>
    * A boost::local_time::bad_adjustment exception will be thrown for:<br>
    * A DST adjustment that is 24 hours or more (positive or negative)<br>
+ *
+ * Note that UTC zone offsets can be greater than +12:
+ * http://www.worldtimezone.com/utc/utc+1200.html
    */
   template<class CharT>
   class posix_time_zone_base : public date_time::time_zone_base<posix_time::ptime,CharT> {
@@ -259,9 +262,9 @@
         base_utc_offset_ = date_time::str_from_delimited_time_duration<time_duration_type,char_type>(ss.str());
         ss.str(empty_string);
 
- // base offset must be within range of -12 hours to +12 hours
+ // base offset must be within range of -12 hours to +14 hours
         if(base_utc_offset_ < time_duration_type(-12,0,0) ||
- base_utc_offset_ > time_duration_type(12,0,0))
+ base_utc_offset_ > time_duration_type(14,0,0))
         {
           boost::throw_exception(bad_offset(posix_time::to_simple_string(base_utc_offset_)));
         }

Modified: branches/release/boost/date_time/time_facet.hpp
==============================================================================
--- branches/release/boost/date_time/time_facet.hpp (original)
+++ branches/release/boost/date_time/time_facet.hpp 2009-10-03 06:04:00 EDT (Sat, 03 Oct 2009)
@@ -160,7 +160,7 @@
   template <class CharT>
   const typename time_formats<CharT>::char_type
   time_formats<CharT>::default_time_duration_format[11] =
- {'%','H',':','%','M',':','%','S','%','F'};
+ {'%','O',':','%','M',':','%','S','%','F'};
 
 
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk