elasticsearch/elasticsearch — pull request #8655 by thanodnl (2014-11-25 15:46:30+00:00)
Title: Solution for date_histogram issues in a timezone on DST switch

The problem was in the difference between the two responses of the `preTz.getOffset` call. To solve this I only call it once.

The behaviour of `roundKey` changed that it is now returning the actual rounded timestamp rounded timestamp offsetted to UTC. The exact opposite is true for `valueForKey` which used to accept the UTC offsetted timestamp but now needs to work on the normal timestamp.

The tests for rounding are all passing, including the tests I added where the issue was shown.

Closes #8339

/cc @jpountz