Skip to content

Conversation

@mertyldrm
Copy link

@mertyldrm mertyldrm commented Oct 22, 2025

What this PR does / why we need it: Round IntervalFunction under gtime.go file had a faulty condition for 2 years range, since the condition was set to 42 days in ms, every interval longer than 42 days was set to 1 years of interval.

Which issue(s) this PR fixes: This PR fixes the case for 2 years by fixing the condition to 2 years in ms

Fixes
I updated the condition to 63072000000 ms which is 2 years.

Special notes for your reviewer:

Since 3628800000 ms is equal to 42 days any range longer than that falls to the default case which is 1 year. I updated the condition to 63072000000 ms which is 2 years.
@CLAassistant
Copy link

CLAassistant commented Oct 22, 2025

CLA assistant check
All committers have signed the CLA.

@grafana-plugins-platform-bot grafana-plugins-platform-bot bot moved this from 📬 Triage to 🔬 In review in Plugins Platform / Grafana Community Oct 22, 2025
Copy link
Contributor

@itsmylife itsmylife left a comment

Choose a reason for hiding this comment

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

That's a nice catch. Do you mind adding/updating the unit test related to that value?

@github-project-automation github-project-automation bot moved this from 🔬 In review to 🧑‍💻 In development in Plugins Platform / Grafana Community Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🧑‍💻 In development

Development

Successfully merging this pull request may close these issues.

3 participants