0
在我的CentOS 6.9環境下,boost-devel指的是Boost 1.4 .0庫。Boost 1.41.0:boost :: locale的替代方案?
的問題是,升壓:語言環境不適用於相對於一個特定的時區我的日期的計算,如升壓:語言環境似乎來加速1.4 0.0。
是否有替代做類似1.41(或替代Boost)的事情?
// adding a day to now with timezone in mind
std::locale::global(...a specific locale...);
date_time now;
now = now + period:day();
下面是另一個時區庫,它非常完整:https://howardhinnant.github.io/date/tz.html但是,我不知道它是否適用於舊環境。它需要C++ 11的''。以下是示例代碼,顯示在夏令時間更改期間的任意時區中將當地時間添加到1天的時間:https://github.com/HowardHinnant/date/wiki/Examples-and-Recipes#local_arithmetic –