date_time icon indicating copy to clipboard operation
date_time copied to clipboard

Boost.org date_time module

Results 63 date_time issues
Sort by recently updated
recently updated
newest added

The below function which is invoked by time_from_string when a month name such as "May" is used - populates the table when empty. However when two threads make the same...

The following code ` tz_database tz_db; tz_db.load_from_file("./date_time_zonespec.csv"); time_zone_ptr nyc = tz_db.time_zone_from_region("Europe/Stockholm"); auto s = nyc->to_posix_string(); setenv("TZ", s.c_str(), 1); ` will set TZ to "CET+01CEST+01,M3.5.0/02:00,M10.5.0/03:00" which will cause Stockholm local time...

Commit 4e1b7cde45ed introduced `constexpr` functions. A code analysis with Visual C++ 2022 and the Microsoft Recommended Native Recommended Rules spits out the warning "con.5" from the category ["Constants and immutability"](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rconst-constexpr)...

Some static analyzers complain about unannotated case fallthrough; using BOOST_FALLTHROUGH from config.hpp silences these and serves the same documentation purpose.

Fixes #233. Calling `microsec_clock::universal_time()` directly avoids the issue where the second could change between the calls to `second_clock::local_time()` and `second_clock::universal_time()`.

Extremely rarely, a call to `local_microsec_clock::local_time(time_zone_ptr)` will return a result about 1 second in the past. On my local machine, running the following code: ```c++ #include #include int main() {...

for consistency with `greg_day`, `greg_month`. This is useful e.g. for `std::format("{:02}/{:02}/{:04}", month.as_number(), day.as_number(), year.as_number())`.

I have developed a tool for migrating high-quality unit tests from well-known open source libraries to other projects. I have successfully used this tool to migrate 10 unit tests from...

When the time type is `boost::posix_time::ptime`, Boost.DateTime output facets don't produce any output for "%Z", "%z", "%Q" and "%q" flags. Here is an example: ``` #include #include #include #include static...