Questions tagged [boost-date-time]

Boost.Date_Time is a set of C++ date-time libraries based on generic programming concepts.

Boost.Date_Time is a set of C++ date-time libraries based on generic programming concepts.

Date-time libraries provide fundamental infrastructure for most development projects. However, most of them have limitations in their ability to calculate, format, convert, or perform some other functionality. For example, most libraries do not correctly handle leap seconds, provide concepts such as infinity, or provide the ability to use high resolution or network time sources. These libraries also tend to be rigid in their representation of dates and times. Thus customized policies for a project or subproject are not possible.

Programming with dates and times should be almost as simple and natural as programming with strings and integers. Applications with lots of temporal logic can be radically simplified by having a robust set of operators and calculation capabilities. Classes should provide the ability to compare dates and times, add lengths or time durations, retrieve dates and times from clocks, and work naturally with date and time intervals.

Another motivation for development of the library was to apply modern C++ library design techniques to the date-time domain. Really to build a framework for the construction of building temporal types. For example, by providing iterators and traits classes to control fundamental properties of the library. To the authors knowledge this library is the only substantial attempt to apply modern C++ to a date-time library.

127 questions
1
vote
1 answer

Boost error: not found boost_date_time-vc80-mt-1_41.dll

I need to run examples of software that uses boost libraries for VS2008, but the following error occurs: this application can not be started because it was not found boost_date_time-vc80-mt-1_41.dll I have set the PATH variable: set…
David
  • 171
  • 2
  • 6
  • 18
1
vote
1 answer

boost error: reference to 'detail' is ambiguous

I'm compiling a large program with gcc-4.4.7 --std=c++0x and several libraries from boost-1.53. The compiler is complaining about a bunch of errors in the boost libraries (below), but not about my code. Is this a bug in boost libraries? How would…
theTrickster
  • 99
  • 1
  • 8
1
vote
1 answer

Extracting strings of dates and determining which is earlier

I'm working on a simple NLP project which given a string, the various parameters would be determined. Given the following input: 07122012 12102012 Code: string REGEX_DATE = "((\\d{2})/(\\d{2})/(\\d{4}))"; regex…
Larry Lee
  • 61
  • 1
  • 6
1
vote
0 answers

where is boost make_seconds?

Nice day to all! I try to compile a little example from boost docs pdf's: #include "boost/icl/interval.hpp" #include "boost/icl/interval_set.hpp" #include "boost/date_time/posix_time/posix_time_duration.hpp" #include #include…
amaranth
  • 979
  • 2
  • 22
  • 40
0
votes
2 answers

Convert string to boost::gregorian::greg_month

In the Boost date time library, is there a utility function for converting month short strings (e.g. Jan, Feb, Mar, Apr) to boost::gregorian::greg_month type? The documentation for the library isn't great and I can't see anything in the headers.
Graeme
  • 4,514
  • 5
  • 43
  • 71
0
votes
2 answers

Linker error using boost::gregorian::from_string()

I used boost for visual studio 2005 with version 1.48. I am receiving a linker error while attempting to use boost::gregorian::from_string(). #include #define BOOST_DATE_TIME_SOURCE #include using…
0
votes
0 answers

c++ boost: daylight adjustment for cities out of the US?

I'm a c++ noob. I'm creating a util method which converts GMT epoch to several cities over the world. I know I can use boost::posix_time::us_dst to perform auto adjustment of daylight saving time for cities within the US, like…
noobie2023
  • 721
  • 8
  • 25
0
votes
0 answers

Cross compile boost library for Raspberry Pi 4 32-bit gives gnu/linux insted of sysv and doesn't work on pi

I have a raspberry pi board and I want to cross compile the boost to use date_time lib form Ubuntu 22.04 host. every time I try to compile and check the file type using file command it gives this libboost_date_time.so.1.66.0: ELF 32-bit LSB shared…
0
votes
1 answer

boost single thread libraries in cygwin

I just built and installed boost_1_47_0 using the following on cygwin ./bootstrap.sh --with-libraries=chrono,date_time,exception,filesystem,graph,graph_parallel,iostreams,math,program_options,random,serialization,signals,system,test,thread,wave …
itcplpl
  • 780
  • 4
  • 18
  • 29
0
votes
1 answer

libboost_date_time linker error

I just built and installed boost on cygwin and was trying to compile a program but it gave me a linker error because it was looking for libboost_date_time, and I have libboost_date_time-mt instead in usr/local/lib I tried to reinstall boost using…
itcplpl
  • 780
  • 4
  • 18
  • 29
0
votes
1 answer

boost ptime from sql server timestamp_t is off by minutes. What did I do wrong?

I have a SQL server database and I am pulling dates from it and converting the type of timestamp_t into Int64 as such: Int64 from_timestamp_t(dtl::timestamp_t& t) { // create a new posix time structure boost::posix_time::ptime pt ( …
jjacksonRIAB
  • 127
  • 1
  • 9
0
votes
1 answer

Where to define a macro when compiling a shared library that contains multiple files

I want to #define BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG so as to use nanosecond resolution in boost datetime. I want to use this nanosecond across the whole shared library I'm going to compile. So where should I put this line, #define…
Max Wong
  • 694
  • 10
  • 18
0
votes
1 answer

How to generate document for boost date_time

I select boost 1.80.0 Boost page link is not work , I got three doc link form boost. date_time_document…
Tom
  • 333
  • 2
  • 8
0
votes
1 answer

How to create custom boost::posix_time to_string formatters?

Currently I have to use stuff like ptime t = from_time_t(last_write_time(p)); std::string Created = boost::posix_time::to_iso_extended_string(t) ; or: ptime t = from_time_t(last_write_time(p)); std::ostringstream…
Rella
  • 65,003
  • 109
  • 363
  • 636
0
votes
1 answer

Boost ptime: how to format data in a way browsers send inside headers of http requests?

I need to format my ptime in such way Wed, 21 Jan 2004 19:51:30 GMT How to do such thing with boost? (so it would look like data format of HTTP servers Expires and Last-Modified and Date response headers )
Rella
  • 65,003
  • 109
  • 363
  • 636
1 2 3
8 9