Commit Graph

575 Commits

Author SHA1 Message Date
Jeff Garland
e26fd2ed98
pull develop to master for boost 1.72 (#117)
* Synchronize each miscrosec test to the next second (#109)

* Synchronize each miscrosec test to the next second

The aim is to avoid false positives in test_microsec when the seconds,
minutes or hours change during time read between the second_clock and
the microsec_clock.

* Improved readability of the microcec_time_clock test

* Improve performance of adding and subtracting time durations from a ptime. (#99)

Modifying ptime objects by adding and subtracting time durations was
inefficient because it extracted the date and time of day and then
re-constructed a ptime using the date and modified time of day.

This can be avoided by using the existing time_system utilities which
perform the operation by adjusting the number of ticks.

Performance is improved by a factor of 48 on my system.

* Update CI Scripts

* Add time_duration helper functions: (#113)

1. is_positive()
  - Return boolean value to indicate whether or not time duration is
    positive.
2. is_zero()
  - Return boolean value to indicate whether or not time duration is
    zero.
3. abs()
  - Return a time_duration which is the absolute value of time
    duration.

Added documentation for these helper functions and improved existing
documentation to indicate constness, return values or static
functions.

* Cease dependence on MPL (#115)
2019-12-03 17:06:28 -07:00
LE GARREC Vincent
29bb209464 Fix unsigned / signed conversion
gregorian_calendar::end_of_month_day returns unsigned short and date constructor uses unsigned short too.
2019-05-10 10:32:15 -04:00
ehrlin
b0437e2999 Renamed parameter dst_length_minutes to dst_length. (#96) 2019-03-04 11:29:48 -05:00
Marcel Raad
5902a0e577 Fix doxygen clang warnings (#97)
* doxygen: use @tparam for template parameters (clang warns about using @param).
2019-02-25 15:27:45 -05:00
Sylvain Joubert
dc5ce19c27 Use nullptr instead of 0 if possible
This is to prevent gcc's -Wzero-as-nullptr-constant warnings
2018-09-06 07:22:34 -04:00
Andrey Semashev
1838518b41 Silence MSVC warnings about conditional expression being constant.
The warning is emitted whereever std::numeric_limits<>::is_signed is used
in a conditional statement.
2018-02-10 23:42:44 -05:00
James E. King III
3f092da750 trac-13159, trac-12630: fix maximum year to 9999 2018-01-24 09:44:04 -05:00
James E. King III
1a2700d527 fix issues identified by Coverity Scan 2018-01-23 17:57:36 -05:00
James E. King III
8b92513a94 trac-1078: given to_iso_string can print special values, make from_iso_string read them 2018-01-22 15:49:25 -05:00
James E. King III
d8a1ed32fb add codecov.io, cppcheck, ubsan, and coverity scan support; refactor travis to use jobs 2018-01-21 20:14:06 -05:00
James E. King III
e0da18162a trac-9882: fix gcc -Wshadow errors and warnings enabled by trac-3606 2018-01-17 09:22:22 -05:00
James E. King III
18b6ca8160 trac-11142: fix boost::date_time::period_parser::delimiter_strings and add a unit test for it
also added project declarations to jamfiles, added a top level jamfile, and fixed the xmldoc jamfile
also fixed a silent failure y2038 issue in localtime handling and fixed a timezone database parse issue
2018-01-16 12:46:45 -05:00
Edward Diener
00ab3d7226
Merge pull request #64 from jeking3/trac-11168
trac-11168: special_values handling in time duration helpers
2017-12-31 00:42:27 -05:00
Edward Diener
6e3761271d
Merge pull request #60 from jeking3/trac-12363
trac-12363: fix const correctness issue in operator implementations
2017-12-31 00:05:44 -05:00
Edward Diener
2bf11e74a2
Merge pull request #59 from jeking3/trac-12910
trac-12910: allow %j without a year specifier - uses epoch year
2017-12-30 23:32:49 -05:00
Edward Diener
2e4a3010f0
Merge pull request #58 from jeking3/issue-56
issue-56: fix binary serialization compatibility problem with time_duration
2017-12-30 16:26:42 -05:00
James E. King III
de171954fe Fix serialization problem with time_duration
This fixes #56
2017-12-29 23:38:44 -05:00
James E. King III
f9f2aaf521 trac-11168: ensure special values are not automatically translated to integral types in the hours, minutes, seconds, and fractional seconds time duration helpers 2017-12-28 14:44:01 -05:00
James E. King III
af8832799f trac-12363: fix const correctness issue in operator implementations 2017-12-27 08:22:50 -05:00
James E. King III
e87b7120ac trac-12910: allow %j without a year specifier - uses epoch year 2017-12-26 12:02:14 -05:00
James E. King, III
b3b6ddd5ba trac-13194: fix time input facet processing for %e 2017-12-22 08:02:24 -05:00
Edward Diener
3a5f651c30
Merge pull request #50 from Lastique/silence_msvc_warnings
Silence MSVC warnings about integer truncation
2017-11-05 02:04:11 -05:00
Andrey Semashev
405e66e7e7 Silence MSVC warnings about integer truncation.
Also for day/month/year types use the value_type typedef to accept and
return numeric values of the date component.
2017-10-25 00:14:17 +03:00
Andrey Semashev
5f2d1fad55 Updated Boost.WinAPI usage to the new location and namespace. 2017-10-24 21:45:07 +03:00
Edward Diener
805b89d987 Corrected warning by casting to the correct type. 2017-10-14 10:49:26 -04:00
Marshall Clow
d9b355d2c2 Remove the need for static_cast by using the correct type 2017-09-12 17:24:46 -07:00
Andrey Semashev
da6038df30 Silence MSVC warnings about possible integer truncation. 2017-09-05 21:06:06 +03:00
Andrey Semashev
8e2a8fdcb2 Adjust indentation to match the surrounding code. 2017-08-28 20:17:40 +03:00
Andrey Semashev
e9ddfa6400 Silence MSVC-8 bogus warning about possible integer truncation. 2017-08-28 19:43:08 +03:00
Andrey Semashev
1e844a3143 Ported Windows-specific time functions to Boost.WinAPI. 2017-08-28 19:00:18 +03:00
Andrey Semashev
6af6215e9e Fixed integer overflow when subtracting many years to a gregorian date.
Also added a testcase to detect the overflow.
2017-08-08 17:42:51 +03:00
Andrey Semashev
729af79cc5 Fixed integer overflow when adding many years to a gregorian date.
Also added a testcase to detect the overflow.
2017-08-08 17:23:46 +03:00
Paul Groke
5974bdcbb9 workaround for z/OS compiler (define BOOST_DATE_TIME_NO_LOCALE) 2017-05-05 18:11:02 +02:00
Daniela Engert
b1dc2b306e fix narrowing warnings
Signed-off-by: Daniela Engert <dani@ngrt.de>
2017-04-26 14:03:45 +02:00
James E. King, III
818dea52f3 4543: fix ptime 2038 issue 2017-02-21 16:37:53 -05:00
Edward Diener
47cf10d5fd Merge pull request #27 from Lastique/facets_visibility
Add support for hidden visibility
2016-12-03 02:11:50 -05:00
Edward Diener
51659e3404 Corrected use of config macro 2016-11-07 00:12:38 -05:00
Edward Diener
22a3727798 Replace auto_ptr with unique_ptr when it is appropriate. 2016-11-06 21:01:54 -05:00
K. Noel Belcourt
ef8fa5b5d5 Add declaration of to_iso_string in boost::gregorian namespace.
Should fix include order issue.
2016-11-03 13:53:13 -06:00
David Callu
ee4ceddc52 add posix_time::from_iso_extended_string 2016-05-26 21:15:13 +02:00
Sascha Zelzer
e37ce12d57 Avoid dereferencing the input string iterator in the fall-through case. 2016-05-06 12:03:34 +02:00
Edward Diener
a742fcbffd Merge pull request #24 from joachim-faulhaber/date_time_patches_1_59_0_v1
Warning fixes for conversion warnings
2015-10-17 00:27:44 -04:00
Edward Diener
9fbd8db5c9 Merge pull request #23 from joachim-faulhaber/date_time_patches_1_59_0
Warning fixes for conversion warnings
2015-10-17 00:27:18 -04:00
Andrey Semashev
bd3973017c Added visibility attributes to exceptions, date, time and other associated types to ensure the facets have the default visibility. 2015-10-04 22:09:09 +03:00
Andrey Semashev
73de7bc29f Added visibility attributes for facets. 2015-10-04 17:57:19 +03:00
Joachim Faulhaber
03c419d8b6 Corrected warning fix: added static cast 2015-09-23 16:12:10 +02:00
Joachim Faulhaber
350dc3342d Corrected warning fix: added static cast 2015-09-23 16:07:12 +02:00
Joachim Faulhaber
d5041e7075 Corrected warning fix: added static cast 2015-09-23 16:02:47 +02:00
Joachim Faulhaber
6d09aabddc Corrected warning fix: paren mismatch 2015-09-23 15:54:22 +02:00
Joachim Faulhaber
75176687d7 Warning fix: Implicit conversion loses integer precision. 2015-09-22 13:50:16 +02:00