Boost C++ Libraries: Ticket #2475: Boost.Date_Time Enhancement - Load of Time Zone Database via istream https://svn.boost.org/trac10/ticket/2475 <p> Hello, in Boost.Date_Time there is a function to load the Time Zone Database from a file. The function 'load_from_file' takes a string as parameter which contains a local filename to load the database from. </p> <p> It is sometimes desirable to load the database from another source than a local file. </p> <p> To support this i suppose to add a function 'load' and alter the existing 'load_from_file' in the following sense </p> <pre class="wiki"> void load( std::istream&amp; ifs ) { string_type in_str; std::string buff; if(!ifs){ throw data_not_accessible(); } std::getline(ifs, buff); // first line is column headings while( std::getline(ifs, buff)) { parse_string(buff); } } void load_from_file(const std::string&amp; pathspec) { std::ifstream ifs(pathspec.c_str()); if(!ifs){ throw data_not_accessible(pathspec); } load( ifs ); } </pre><p> Best regards Sönke Schau </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2475 Trac 1.4.3 Marshall Clow Wed, 04 May 2011 19:54:38 GMT <link>https://svn.boost.org/trac10/ticket/2475#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2475#comment:1</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/71720" title="added 'load_from_stream'; refs #2475">[71720]</a>) added 'load_from_stream'; refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2475" title="#2475: Feature Requests: Boost.Date_Time Enhancement - Load of Time Zone Database via istream (closed: fixed)">#2475</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Marshall Clow</dc:creator> <pubDate>Wed, 01 Jun 2011 15:52:11 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/2475#comment:2 https://svn.boost.org/trac10/ticket/2475#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/72329" title="Merge fixes to release; Fixes #2475">[72329]</a>) Merge fixes to release; Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2475" title="#2475: Feature Requests: Boost.Date_Time Enhancement - Load of Time Zone Database via istream (closed: fixed)">#2475</a> </p> Ticket