mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Catch out-of-range exception at beginning and end of TZFile on Fedora.
This commit is contained in:
parent
0b55c746c8
commit
577aa3fe02
@ -562,6 +562,8 @@ TimeZoneProvider::TimeZoneProvider(const std::string& tzname) : zone_vector {}
|
||||
auto this_time = ptime(date(1970, 1, 1),
|
||||
time_duration(txi->timestamp / 3600, 0,
|
||||
txi->timestamp % 3600));
|
||||
try
|
||||
{
|
||||
auto this_year = this_time.date().year();
|
||||
//Initial case
|
||||
if (last_time.is_not_a_date_time())
|
||||
@ -590,6 +592,11 @@ TimeZoneProvider::TimeZoneProvider(const std::string& tzname) : zone_vector {}
|
||||
new_rule));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(boost::gregorian::bad_year err)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
last_time = this_time;
|
||||
last_info = this_info;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user