Opened 9 years ago

Closed 6 years ago

#2475 closed Feature Requests (fixed)

Boost.Date_Time Enhancement - Load of Time Zone Database via istream

Reported by: soenke@… Owned by: az_sw_dude
Milestone: Boost 1.38.0 Component: date_time
Version: Boost 1.36.0 Severity: Optimization
Keywords: Cc:


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.

It is sometimes desirable to load the database from another source than a local file.

To support this i suppose to add a function 'load' and alter the existing 'load_from_file' in the following sense

      void load( std::istream& ifs )
        string_type in_str;
        std::string  buff;

          throw data_not_accessible();
        std::getline(ifs, buff); // first line is column headings

        while( std::getline(ifs, buff)) {

      void load_from_file(const std::string& pathspec)
        std::ifstream ifs(pathspec.c_str());
          throw data_not_accessible(pathspec);
        load( ifs );

Best regards Sönke Schau

Attachments (0)

Change History (2)

comment:1 Changed 6 years ago by Marshall Clow

(In [71720]) added 'load_from_stream'; refs #2475

comment:2 Changed 6 years ago by Marshall Clow

Resolution: fixed
Status: newclosed

(In [72329]) Merge fixes to release; Fixes #2475

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain az_sw_dude.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.