Skip to content

Put leap seconds into const vector#150

Closed
anragsi wants to merge 6 commits intomasterfrom
149-ar-bug-initialization-leapsecond-list
Closed

Put leap seconds into const vector#150
anragsi wants to merge 6 commits intomasterfrom
149-ar-bug-initialization-leapsecond-list

Conversation

@anragsi
Copy link
Collaborator

@anragsi anragsi commented Oct 7, 2025

No description provided.


void test_conversion_forth_and_back()
{
for (int i = 0; i < 28; ++i) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! One less magic number that is hard to fix if a second is added.

// Reference: IETF Leap Seconds List
// Source: https://www.ietf.org/timezones/data/leap-seconds.list
// Last updated: [Okt-2025]
const std::vector<LeapSecond> LEAP_SECONDS_TABLE {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

constexpr would be nice

@anragsi
Copy link
Collaborator Author

anragsi commented Jan 28, 2026

Was solved by #155

@anragsi anragsi closed this Jan 28, 2026
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.

Lazy initialization of leap time list causes inconsistent performance when requesting the time from the ECA

2 participants