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