Skip to content

Conversation

@NewYaroslav
Copy link
Owner

  • Sync stable with main for v1.0.5 release.
  • Includes fast date conversions, ISO week-date, DateTime type, NTP updates, and test expansions.

NewYaroslav and others added 30 commits September 20, 2025 04:28
Inline non-template header functions and replace static thread local storage to avoid ODR violations. Add a two-TU minimal project to prove multi-translation-unit compatibility.
Rename the ODR sample project folder to tests/odr, rename the executables, and register them as ctest cases so CI covers them.

Also adjust the helper return value to keep the tests passing.
* fix(odr): inline header definitions

Inline non-template header functions and replace static thread local storage to avoid ODR violations. Add a two-TU minimal project to prove multi-translation-unit compatibility.

* test(odr): rename suite and hook into ci

Rename the ODR sample project folder to tests/odr, rename the executables, and register them as ctest cases so CI covers them.

Also adjust the helper return value to keep the tests passing.
Update project metadata and changelog for the 1.0.4 release.
Replace %lld usages with PRId64 macros to silence compiler warnings about mismatched types.
* chore(vcpkg): update port to v1.0.4

* fix(vcpkg): update time-shield hash

Adjust the overlay port to use the new SHA512 for the v1.0.4 source archive so vcpkg accepts the download.

* fix(vcpkg): refresh time-shield v1.0.4 hash

Recalculate the SHA512 checksum for the retagged v1.0.4 source archive.

* fix(vcpkg): refresh v1.0.4 tarball hash

* fix(vcpkg): refresh v1.0.4 hash

Update overlay port to match the latest retagged tarball.
Document tick units, add stop control, and use compensated accumulation for recorded samples while updating tests.
Document tick units, add stop control, and use compensated accumulation for recorded samples while updating tests.
- expose deadline, expiration, and remaining-time helpers that use project timestamp aliases\n- extend the regression test to cover the new conversions
Wrap steady-clock max calls with macro-safe syntax so MSVC no longer expands Windows' max macro during ODR builds.
Promote the workday boundary routines in time_conversions.hpp to public helpers with documentation and update their callers. Extend the boundary unit test to cover the helpers directly.
Expand the v1.0.5 notes with timezone offset helpers and parser/workday conversion additions introduced since 1.0.4.
Restrict ISO8601 millisecond parsing to three digits and allow fractions when seconds are zero.
- anchor realtime to monotonic clocks on Unix for stable microsecond timestamps
- exercise realtime sampling in examples and unit tests
- note the precision alignment in the changelog
Add changelog entry mentioning new MQL5 workday and ISO parsing helpers added in recent commits.
* docs(changelog): note header split and aliases

Documented the header split, alias additions, and expanded coverage under v1.0.5.

* fix(windows): mark year start alias dependency constexpr

Make start_of_year_ms constexpr so MSVC constexpr aliases compile.

* fix(windows): relax year start ms alias constexpr

Adjust millisecond year-start aliases to inline-only to avoid MSVC constexpr errors.
* docs: add OA and astronomy docs to README-RU

Update Russian README with OA date conversions and new astronomy helpers aligned with latest release.

* docs(readme): clarify oa and astronomy helper notes

Document OA base date, rounding semantics, and UTC behavior plus highlight analytics focus of astronomy helpers in both English and Russian READMEs.
This highlights that the change introduces the MoonPhase class, auxiliary helper functions, and related documentation updates.
* add ISO week date structures and type aliases for week-based calendar support
* implement ISO 8601 week-date conversions, formatting, and parsing helpers
* add regression tests covering boundary years, round-trips, and parsing validation
Add MIN_YEAR/MAX_YEAR guards to ISO week validation and early date validation in ISO8601 parsers for C++ and MQL.
Add header-only DateTime wrapper for UTC instants with fixed offsets, parsing, formatting, arithmetic, and boundary helpers. Integrate new example and unit tests exercising ISO8601 round-trip, offsets, ISO week dates, and day boundaries.
* docs(ntp): document pool and service updates

Add NTP pool/service release notes, refresh English and Russian READMEs with templated pool, runner, and time service usage examples.

* fix(ntp): resolve C++17 singleton build on MSVC

Use function-local static for the NTP time service singleton to avoid MSVC undefined-type errors with fake runners, add a portable maybe-unused macro, and apply it to MoonPhase constants to silence C++11 warnings.

* test(ntp): soften pool integration failure on restricted envs

Make the Unix NTP pool integration test non-fatal on timeouts or network failures so macOS C++11 CI passes in restricted environments.

* refactor(ntp): split client core and UDP transport

Extract packet helpers, UDP transport interface, platform transports, and a transport-agnostic core so NtpClient keeps its API while becoming unit-testable without network sockets.

* fix(ntp): unify client over transport core

Rewrite NtpClient to use the transport-agnostic core with platform UDP transports for Windows and Unix, removing legacy packet helpers and resolving C++11 build errors.

* test(ntp): make core test tolerant to realtime timing

Relax offset/delay assertions in the NtpClient core fake-transport test to avoid flakiness from realtime-based timestamps.

* test(ntp): harden core test against realtime variance

Keep the fake-transport core test checking success, error propagation, and stratum while avoiding brittle offset/delay expectations that depend on arrival timing.

* ci: dump and archive ctest logs

Show LastTest.log, rerun failed tests verbosely, and upload Testing artifacts on all platforms to diagnose CI failures.

* test(ntp): force parse failure deterministically

Set fake NTP reply timestamps to pre-1970 values so ntp_ts_to_unix_us rejects them, keeping the core test stable across platforms.

* ci: fix windows test stability

Link test binaries with ws2_32 on Windows and run test log collection steps under bash so missing logs do not fail the workflow.
Removed unnecessary includes for config and time_utils.
Removed unnecessary include for config.hpp.
Removed unnecessary include of config.hpp from udp_transport.hpp
Removed unnecessary include of config.hpp.
Removed unnecessary includes for config and wsa_guard.
Removed unnecessary include of config.hpp.
Refactor query call for better readability and remove unnecessary include for Windows.
Removed unnecessary calls to freeaddrinfo for res.
* fix(build): resolve CI warnings and error

Adjust constexpr logic, include missing time utilities, and silence conversion warnings.

* fix(tests): move time utils include

Remove time_utils include from NTP core header and include it in the core test.

* fix(build): address remaining conversion warnings

Cast conversion helpers to requested types and drop unused tag parameters.

* fix(build): silence ntp pool sign warnings

Use difference_type for median iterator offsets to avoid sign-conversion warnings.

* fix(build): silence C++11 macOS warnings

Adjust constexpr usage, guard nodiscard for C++17+, and simplify atomic init.

* fix(tests): silence MSVC unused warnings

Mark test-only variables and parameters as used when asserts are stripped.

* docs(config): clarify atomic init for C++11

Document that direct std::atomic value initialization is C++11-safe and avoids braced init warnings.

* fix(build): avoid C++11 macOS warnings

Switch CpuTickTimer to TIME_SHIELD_NODISCARD and initialize constexpr locals in day_of_week_date.

* refactor(core): remove atomic init macro

Replace TIME_SHIELD_ATOMIC_INIT uses with direct atomic initialization and drop the macro.
…alize field comments

* docs(ntp): align udp field comments

Use trailing ///< comments for UdpRequest fields and align them on one line.

* chore: update include guards in udp_transport.hpp

* chore: update include guards in ntp_client_pool.hpp
Update NTP-related header include guards to match project prefixing rules.
* fix(ntp): use inline storage for service

Align NtpTimeServiceT singleton storage with the C++17 inline rule.

* fix(timezone): silence conversion warnings

Cast weekday calculations to int in DST helpers and tests.

* fix(windows): resolve CI warnings

Move inline singleton storage definition out of the class template and silence MSVC warnings in tests.
…PI and benchmarks

* docs(time): mention fast algorithm

Note the fast date conversion algorithm and its inspiration in the\nDoxygen mainpage.

* fix(time): avoid c++11 odr warnings

Inline constexpr helpers in mul_hi and fast_date to avoid\nmultiple-definition issues in C++11 builds.

* test(time): fix windows warnings

Avoid Windows min/max macro issues and shadowed locals in the
fast date benchmark; silence unused parameter warnings.

* test(timers): relax timing asserts

Reduce flakiness in deadline/elapsed timer test by loosening
sleep-based assertions for CI environments.

* fix(tests): avoid shadowed benchmark locals

Rename unchecked benchmark timing variables to avoid shadowing earlier locals.
…per examples

Translate leap seconds in the Russian README and clarify that
unixday_t/uday_t are signed 64-bit types.
Replace uday_t with dse_t and add unix_day_t/unixday_t aliases.
Update conversions, validation, tests, and docs to use the new type name.
…update tests

* fix(time): adjust timestamp ms bounds

Update MAX_TIMESTAMP to avoid ms overflow and extend boundary tests for negative and ms timestamps.

* fix(tests): reuse detail::floor_div/floor_mod and ensure C++11 compatibility

* fix(constants): cap max timestamp year range

Reduce the maximum timestamp to keep year-end conversions in range for millisecond calculations.

* fix(conversions): align end_of_year_ms with ms bounds

Return the last millisecond of the year to match end-of-year expectations and update coverage assertions.

* fix(conversions): avoid windows min max macros

Wrap numeric_limits min/max in parentheses to prevent Windows macro expansion in timestamp checks.
Updated assertions to use ms_part for day and year boundaries.
…bounds

Updated assertions to check millisecond parts for year boundaries.
@NewYaroslav NewYaroslav merged commit 23f8715 into stable Dec 22, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants