[date_time] recommending upgrading the timezone database
The timezone database in Boost.DateTime doesn't have enough information in it to be accurate all the time. For example if a region changes time zone rules, when applying timezone only the current rule will be applied regardless of the date involved. If a region stops using daylight savings time, but a date/time falls before that rule change, it should still use daylight savings in printed output, correct? The IANA timezone database is more complete, and we could switch Boost.DateTime to use that instead. It is also maintained more frequently than the built-in one, which was last updated 7 years ago, and 4 years before that. Any thoughts on this? https://github.com/boostorg/date_time/issues/67 - Jim
On 7/01/2018 05:49, James E. King, III wrote:
The timezone database in Boost.DateTime doesn't have enough information in it to be accurate all the time. For example if a region changes time zone rules, when applying timezone only the current rule will be applied regardless of the date involved. If a region stops using daylight savings time, but a date/time falls before that rule change, it should still use daylight savings in printed output, correct?
The IANA timezone database is more complete, and we could switch Boost.DateTime to use that instead. It is also maintained more frequently than the built-in one, which was last updated 7 years ago, and 4 years before that.
Any thoughts on this?
I recently came across these: - http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0355r0.html - https://github.com/HowardHinnant/date While they're based around C++11+ and chrono rather than DateTime, they do include support for the IANA timezone database; either downloaded, shipped-with, or using the OS's copy. Perhaps you could coordinate with him to include similar functionality in DateTime, or to bring his library into Boost as a suggested C++11 replacement for DateTime (or everyone could just wait for C++20...)?
participants (2)
-
Gavin Lambert
-
James E. King, III