A C++ library for translating between absolute and civil times using time zone rules, extending the <chrono> library.
CCTZ is a C++ library that extends the C++11 `<chrono>` library to provide comprehensive tools for handling dates, times, and time zones. It solves the problem of correctly converting between absolute time (machine-scale) and civil time (human-scale) using time zone rules, which is crucial for applications dealing with international time representations. The library includes separate components for civil time calculations and time zone conversions based on the IANA time zone database.
C++ developers building applications that require accurate date and time computations across different time zones, such as scheduling systems, logging tools, or international software.
Developers choose CCTZ because it provides a correct and simple API for time zone conversions that integrates seamlessly with the standard C++ `<chrono>` library, avoiding common pitfalls in time programming. Its separation of civil time and time zone logic ensures reliable handling of complex time zone rules and historical changes.
CCTZ is a C++ library for translating between absolute and civil times using the rules of a time zone.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Works directly with C++11's std::chrono for absolute time, making it a natural extension for modern C++ projects without modifying existing code.
Uses the IANA time zone database to handle historical changes and daylight saving time correctly, ensuring reliable conversions for international applications.
The civil-time library is header-only, allowing easy inclusion for date arithmetic without complex linking or build steps.
Emphasizes the distinction between absolute time, civil time, and time zones, which helps developers avoid common pitfalls in time programming.
Requires the IANA time zone database to be installed on the system, which can be absent, outdated, or difficult to manage on some platforms like Windows.
On Windows, it relies on manually installed zoneinfo files rather than native APIs, as admitted in the README, making it less integrated for Windows-centric development.
Optimized for Bazel build system, which might not align with all C++ teams' workflows; while CMake is supported, it may require extra configuration.