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

Date Histogram Facet: Add pre_zone_adjust_large_interval #1744

Closed
kimchy opened this issue Feb 29, 2012 · 0 comments
Closed

Date Histogram Facet: Add pre_zone_adjust_large_interval #1744

kimchy opened this issue Feb 29, 2012 · 0 comments

Comments

@kimchy
Copy link
Member

kimchy commented Feb 29, 2012

Will update the docs with its meaning, pre_zone_adjust_large_interval. Here is an excerpt:

p. Lets take an example. For @2012-04-01T04:15:30Z@, with a @pre_zone@ of @-08:00@. For @day@ interval, the actual time by applying the time zone and rounding falls under @2012-03-31@, so the returned value will be (in millis) of @2012-03-31T00:00:00Z@ (UTC). For @hour@ interval, applying the time zone results in @2012-03-31T20:15:30@, rounding it results in @2012-03-31T20:00:00@, but, we want to return it in UTC (@post_zone@ is not set), so we convert it back to UTC: @2012-04-01T04:00:00Z@. Note, we are consistent in the results, returning the rounded value in UTC.

p. @post_zone@ simply takes the result, and adds the relevant offset.

p. Sometimes, we want to apply the same conversion to UTC we did above for @hour@ also for @day@ (and up) intervals. We can set @pre_zone_adjust_large_interval@ to @true@, which will apply the same conversion done for @hour@ interval in the example, to @day@ and above intervals (it can be set regardless of the interval, but only kick in when using @day@ and higher intervals).

@kimchy kimchy closed this as completed in 078f220 Feb 29, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant