Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

support more from/to specifications, honor timezone controls. #682

Merged
merged 1 commit into from
Jul 11, 2017

Conversation

Dieterbe
Copy link
Contributor

@Dieterbe Dieterbe commented Jul 10, 2017

this allows a bunch more from/to specifications like "now-3h", "midnight" etc. see raintank/dur#1

latest dur library nows needs to be passed in
an explicit timezone. It used to use time.Local which we default
to now as well, but we now allow controlling timezone via configuration
and tz argument in render requests, just like graphite.
(note: graphite defaults to Chicago which seems rather silly)

fix #673
fix #681

I tested setting custom TZ's via config and via tz arg and it all seems to work fine. though there is one weird thing: when you request a non existing timezone, you get an error like "open /home/dieter/code/go/lib/time/zoneinfo.zip: no such file or directory" which is a misleading error

by pulling in latest `dur` library which nows needs to be passed in
an explicit timezone. It used to use time.Local which we default
to now as well, but we now allow controlling timezone via configuration
and `tz` argument in render requests, just like graphite.
(note: graphite defaults to Chicago which seems rather silly)

fix #673
fix #681
@Dieterbe Dieterbe requested review from woodsaj and replay July 10, 2017 09:15
@Dieterbe Dieterbe merged commit 515ee6c into master Jul 11, 2017
@Dieterbe Dieterbe deleted the better-from-now branch September 18, 2018 09:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

configurable timezone allow from/until "now minus foo"
1 participant