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

Timezone and absolute time range #639

Closed
torkelo opened this issue Feb 26, 2014 · 12 comments
Closed

Timezone and absolute time range #639

torkelo opened this issue Feb 26, 2014 · 12 comments

Comments

@torkelo
Copy link
Contributor

torkelo commented Feb 26, 2014

I am unable to get the tz parameter to have any effect on the time range filter. It seems to only change the time axis on the rendered image.

Example:

/render?from=07:00_20140226&until=08:00_20140226&width=400&height=250&target=carbon.agents.graphite.metricsReceived

image

Here I do not have a tz parameter, the from parameter 07:00_20140226 is handled with the default timezone (set in local_settings.py) and the time axis is also shown in the default timezone (Europe/Berlin).

Example2:

/render?from=07:00_20140226&until=08:00_20140226&width=400&height=250&target=carbon.agents.graphite.metricsReceived&tz=America/New_York

image

This image shows the same data, but the time axis shows time in America/New_York timezone, I would expect that the time range "from" parameter also would be parsed as America/New_York and that the graph would change to reflect a completely different time range.

The problem I have is with Grafana, an alternate frontend for graphite. Users located in different time zones cannot zoom (i.e use absolute time ranges). I would like to send the from and until parameter in their local time zone and have graphite translate it.

Looking at render/views.py it looks like from and until is parsed using parseATTime but somehow it is not having any effect when fetching data for the series.

@torkelo
Copy link
Contributor Author

torkelo commented Mar 25, 2014

Anyone have any feedback on this or idea why fz is not affecting the data shown but only the time labels?

@jippi
Copy link

jippi commented Mar 25, 2014

👍

@brutasse
Copy link
Member

FYI I have fixed this issue in graphite-api.

See brutasse/graphite-api@c8854f5

from/until are resolved using the provided timezone and legends are displayed in the requested timezone as well.

@torkelo
Copy link
Contributor Author

torkelo commented Mar 26, 2014

@brutasse nice. will test it.

@Comradin
Copy link

Comradin commented Apr 1, 2015

Any chance, this will be fixed in 0.9.13?

@deniszh
Copy link
Member

deniszh commented Apr 1, 2015

@Comradin,
IIRC it's already done in #989 and later fixes.

@Comradin
Copy link

Comradin commented Apr 1, 2015

Hmm, but why is this issue then still open if it is fixed in master?
Any news on when 0.9.13 will finally arrive?

@deniszh
Copy link
Member

deniszh commented Apr 1, 2015

Good question. Maybe nobody checked if issue is really gone in master / 0.9.x ?
@torkelo, could you please test it?

And please note that master and 0.9.x are different branches.

@obfuscurity
Copy link
Member

@torkelo would you be so kind as to test this against 0.9.x and see if the issue is resolved for you?

@torkelo
Copy link
Contributor Author

torkelo commented Oct 1, 2015

@obfuscurity seems to be working. This is not an issue for Grafana any more, as Grafana switched to using epochs in the from and until parmas

@obfuscurity
Copy link
Member

Thanks @torkelo.

@Dieterbe
Copy link
Contributor

Dieterbe commented Jul 6, 2017

i'm looking into this more , using graphite 1.0.1 and I can report that while this bug is indeed fixed (e.g. date specification is interpreted in the timezone) when specifying timezone with a HH:MM_YYYMMDD pattern, it does not work when using other at-style patterns, such as noon. see examples below. (default TZ is set up to UTC)

patterns it does work with.

target=carbon.agents.b2dd5129e459-a.updateOperations&from=08:00_20170706&tz=America/New_York
tz3
target=carbon.agents.b2dd5129e459-a.updateOperations&from=08:00_20170706
tz4

patterns it does not work with

as originally reported, here the TZ just controls the timestamps returned, it does not control how the data specification is interpreted (thus, which data is fetched)
target=carbon.agents.b2dd5129e459-a.updateOperations&from=noon&tz=America/New_York

tz1
target=carbon.agents.b2dd5129e459-a.updateOperations&from=noon
tz2

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

No branches or pull requests

8 participants