Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Step 1w or 1y results in wrong time range #275

Open
UpBlueio opened this issue Feb 5, 2025 · 3 comments
Open

Step 1w or 1y results in wrong time range #275

UpBlueio opened this issue Feb 5, 2025 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@UpBlueio
Copy link

UpBlueio commented Feb 5, 2025

Hi,

In Grafana if i set the Dashboard to "this Year". When i run a query, this is the request to VM:

start "1735686000" Jan 01 2025 00:00:00 GMT
end "1767222000" Jan 01 2026 00:00:00 GMT
step "21600"

When i set the min Step in the query to 1y, the result will be;

start "1734476400" Dec 18 2024 00:00:00 GMT
end "1766012400" Dec 18 2025 00:00:00 GMT
step "31536000"

Dec 18 2024 instead of Jan 01 2025. This should be the same as if the step is auto.

Same with "This week".
Min step on auto:

start "1738537200" Feb 03 2025 00:00:00 GMT
end "1739142000" Feb 10 2025 00:00:00 GMT
step "600"

Min step on 1w:

start "1738191600" Jan 30 2025 00:00:00 GMT
end "1738796400" Feb 06 2025 00:00:00 GMT
step "604800"

Same here, this the start and end should be not in the middle of the week.

Thank you!

@hagen1778
Copy link
Contributor

Hey @UpBlueio! Do you observe the same behavior with Prometheus Datasource? Do you see these params sent in NetworkTab of your browser?

@UpBlueio
Copy link
Author

Hi @hagen1778 . Prometheus datasource is ok. From Mon to Sun. No issues. I indeed use the networktab of Firefox/Chrome to monitor the traffic. I manually transformed the Unix timestamp to Datetime in this issue so you dont have to.

@hagen1778
Copy link
Contributor

@Loori-R @dmitryk-dk please, take a look.

@hagen1778 hagen1778 added bug Something isn't working and removed need more info labels Feb 19, 2025
dmitryk-dk pushed a commit that referenced this issue Mar 12, 2025
* fix: preserve original timerange to avoid unwanted shifts (#275)

* refactor: remove alignRange function and related tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants