从 IANA 的时区数据库为 boost::date_time 生成 date_time_zonespec.csv?

Generating date_time_zonespec.csv for boost::date_time from IANA's time zone database?

boost::date_time库的时区数据库(date_time_zonespec.csv或boost_1_55_0/libs/date_time/data/date_time_zonespec.csv)好像是not to be up to date. Is there a way to generate it from latest version of IANA time zone database

这应该是在boost::locale reference中找到的答案:

Why don't you use Boost.DateTime time zone support?

Boost.DateTime's time zone support is broken. Time zones can not be represented with a simple table of rules where daylight saving depend only on certain n'th day of week in month. The daylight savings time may vary by year, political issues and many other things.

还有新的 C++20 日期函数,已添加到计时库中。它可以使用您系统的 TZ 数据库,至少在 Linux/Mac 上,或者您可以让库自动将最新的 TZ 下载到文件夹中。您可以在这里尝试一下:https://github.com/HowardHinnant/date