Boost C++ Libraries: Ticket #4545: Invalid posix timezone format https://svn.boost.org/trac10/ticket/4545 <p> Hi, </p> <p> I think that posix_time_zone in Boost.<a class="missing wiki">DateTime</a> is using the wrong sign for offsets from GMT: </p> <p> According to the documentation, posix_time_zone is modeled after IEEE Std 1003.1. The documentation gives several examples, for instance </p> <blockquote> <p> <em>"MST-7"</em> </p> </blockquote> <blockquote> <p> <em>This zone is as simple as it gets. This zone lies seven hours west of GMT and has no daylight savings.</em> </p> </blockquote> <p> But all other sources for IEEE Std 1003.1 I found so far say that negative offsets indicate <strong>east</strong> of GMT, see for instance: </p> <p> <a class="ext-link" href="http://www.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html"><span class="icon">​</span>http://www.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html</a> </p> <blockquote> <p> <em>If preceded by a '-' , the timezone shall be east of the Prime Meridian; otherwise, it shall be west (which may be indicated by an optional preceding '+').</em> </p> </blockquote> <p> <a class="ext-link" href="http://tools.ietf.org/html/draft-ietf-dhc-timezone-01"><span class="icon">​</span>http://tools.ietf.org/html/draft-ietf-dhc-timezone-01</a> </p> <blockquote> <p> <em>The format of the IEEE 1003.1 POSIX timezone specification is defined as follows:[...]If preceded by a '-', the timezone is east of the Prime Meridian, otherwise it is west ('+' is optional)</em> </p> </blockquote> <p> <a class="ext-link" href="http://www.twinsun.com/tz/tz-link.htm"><span class="icon">​</span>http://www.twinsun.com/tz/tz-link.htm</a> </p> <blockquote> <p> <em>Numeric time zone abbreviations typically count hours east of UTC, e.g., +09 for Japan and -10 for Hawaii. However, the POSIX TZ environment variable uses the opposite convention. For example, one might use TZ="JST-9" and TZ="HST10" for Japan and Hawaii, respectively.</em> </p> </blockquote> <hr /> <p> IMO, the implementation and/or the documentation should be changed. Personally, I'd prefer a change in the implementation, even though this would be a rather nasty breaking change. </p> <p> Regards, </p> <p> Roland </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4545 Trac 1.4.3 fkonvick Sat, 28 Sep 2013 08:13:32 GMT version, milestone changed https://svn.boost.org/trac10/ticket/4545#comment:1 https://svn.boost.org/trac10/ticket/4545#comment:1 <ul> <li><strong>version</strong> <span class="trac-field-old">Boost 1.44.0</span> → <span class="trac-field-new">Boost 1.54.0</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.44.0</span> → <span class="trac-field-new">To Be Determined</span> </li> </ul> <p> I was just about to post to boost-users on this (but then I found this ticket so I won't). My observation is the same. I was able to find the following discussion on the subject: </p> <p> <a class="ext-link" href="http://lists.boost.org/boost-users/2006/10/23162.php"><span class="icon">​</span>http://lists.boost.org/boost-users/2006/10/23162.php</a> </p> <p> The problem I see is that the documentation says that the library follows the POSIX standard but it really doesn't. I also saw that some toolkits that use the Boost implementation claim the same thing, which IMHO causes a lot of existing and potential future confusion. </p> <p> I think that either the docs should be fixed, or the code changed to respect the standard. </p> <p> I'm changing the Version to 1.54 as is still exists there (I believe it also happens on the newer versions) and re-setting the Milestone to TBD (clearly 1.44 is not valid anymore). </p> Ticket anonymous Thu, 16 Jun 2016 17:04:41 GMT version changed https://svn.boost.org/trac10/ticket/4545#comment:2 https://svn.boost.org/trac10/ticket/4545#comment:2 <ul> <li><strong>version</strong> <span class="trac-field-old">Boost 1.54.0</span> → <span class="trac-field-new">Boost 1.61.0</span> </li> </ul> <p> Just discovered the same thing today. We're using 1.61. </p> Ticket anonymous Thu, 16 Jun 2016 17:04:48 GMT version changed https://svn.boost.org/trac10/ticket/4545#comment:2 https://svn.boost.org/trac10/ticket/4545#comment:2 <ul> <li><strong>version</strong> <span class="trac-field-old">Boost 1.54.0</span> → <span class="trac-field-new">Boost 1.61.0</span> </li> </ul> <p> Just discovered the same thing today. We're using 1.61. </p> Ticket anonymous Thu, 16 Jun 2016 17:04:49 GMT version changed https://svn.boost.org/trac10/ticket/4545#comment:2 https://svn.boost.org/trac10/ticket/4545#comment:2 <ul> <li><strong>version</strong> <span class="trac-field-old">Boost 1.54.0</span> → <span class="trac-field-new">Boost 1.61.0</span> </li> </ul> <p> Just discovered the same thing today. We're using 1.61. </p> Ticket anonymous Mon, 12 Mar 2018 20:05:49 GMT version changed https://svn.boost.org/trac10/ticket/4545#comment:3 https://svn.boost.org/trac10/ticket/4545#comment:3 <ul> <li><strong>version</strong> <span class="trac-field-old">Boost 1.61.0</span> → <span class="trac-field-new">Boost 1.44.0</span> </li> </ul> Ticket