boost-date-time

    1熱度

    4回答

    我有下面的代碼從了posix_time boost::posix_time::ptime time1(boost::gregorian::date(9999,12,31)); boost::posix_time::ptime epoch(boost::gregorian::date(1970,1,1)); boost::posix_time::time_duration diff = tim

    1熱度

    1回答

    我得到一個missing template arguments使用boost編譯簡單的日期解析測試時,這裏是代碼: #include "boost/date_time/gregorian/gregorian.hpp" #include "boost/date_time/gregorian/parsers.hpp" boost::date_time::date test = boost::gr

    1熱度

    1回答

    我使用的檢索使用boost::posix_time包含當前時間的字符串下面的方法: wstring TimeField::getActualTime() const { // Defined elsewhere auto m_facet = new new boost::posix_time::wtime_facet(L"%Y%m%d-%H:%M:%f"); std:

    2熱度

    1回答

    我有兩個升壓的ptime的time_from和time_to我想找到這兩個時間之間的每個日期,最初我 const auto date_duration(time_to.date() - time_from.date()); for(int i = 0; i < date_duration.days(); ++i) { time_from.date() + boost::gregori

    1熱度

    1回答

    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。有沒有辦法從latest version of IANA time zone database生成它?

    3熱度

    1回答

    這是怎麼得到「前兩天」使用boost::date: boost::gregorian::date today = boost::gregorian::day_clock::local_day(); boost::date_time::day_functor<boost::gregorian::date> day_offset(-2); boost::gregorian::date modifi

    2熱度

    1回答

    我遇到了與Boost相關的一個看似無法穿透的編譯錯誤,我將其簡化爲包含單個boost頭文件。在編制(與GCC 4.2在Mac OS X 10.6.8)僅包含這一個空文件包括: #include "boost/date_time/posix_time/posix_time.hpp" ...生成這些錯誤: In file included from ../../../Boost Libraries

    0熱度

    1回答

    我有一個在GMT工作的服務器應用程序。我的應用程序與柏林時區的服務器通信,我不時從該服務器讀取一些文件。我需要比較這些文件的時間。考慮到夏季和冬季時間的變化,我如何將遠程服務器的時間從柏林時區轉換爲格林威治時間?你知道mb從boost.date_time什麼東西可以幫助我輕鬆做到嗎? 我不是想從當地時間轉換爲gmt。我正在從一個特定的時區轉換到gmt。我需要有一個強大的方式來處理不同的時區。

    1熱度

    1回答

    日期時間解析存在一些問題,我不知道有什麼好的解決方法。 考慮下面的代碼: #include <iostream> #include <string> #include <boost/date_time/gregorian/gregorian.hpp> namespace dt = boost::gregorian; dt::date parse_date(const std::stri

    0熱度

    1回答

    我想在我的代碼中處理日期和時間,並且已經指向了boost庫的方向 - 特別是boost :: locale :: date_time(部分原因是這允許我避免夏令時奇怪使我以前的實施困難)。 但是,我得到不一致的結果。當我在date_time對象中存儲日期,然後嘗試從中獲取數據時,這是不正確的。這裏有一個例子: #include <boost\\asio\\error.hpp> #include