1 | #include <boost/date_time/local_time/local_time.hpp>
|
---|
2 |
|
---|
3 | int main() {
|
---|
4 | try {
|
---|
5 | boost::local_time::tz_database tz_db;
|
---|
6 | tz_db.load_from_file("./date_time_zonespec.csv");
|
---|
7 | } catch(const boost::local_time::data_not_accessible& dna) {
|
---|
8 | std::cout << "dna" << std::endl;
|
---|
9 | } catch(const boost::local_time::bad_field_count& bfc) {
|
---|
10 | std::cout << "bfc" << std::endl;
|
---|
11 | } catch (const std::exception& ex) {
|
---|
12 | std::cout << "execption: " << ex.what() << std::endl;
|
---|
13 | } catch (...) {
|
---|
14 | std::cout << "general exception" << std::endl;
|
---|
15 | }
|
---|
16 |
|
---|
17 | return 0;
|
---|
18 | }
|
---|