# Date histogram (buckets keys calculation)

**URL:** <https://discuss.elastic.co/t/date-histogram-buckets-keys-calculation/93127>\
**Category:** Elasticsearch\
**Created:** [July 14, 2017, 6:40am UTC](https://discuss.elastic.co/t/date-histogram-buckets-keys-calculation/93127 "2017-07-14T06:40:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![besogon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/besogon/32/20063_2.png) [@besogon](https://discuss.elastic.co/u/besogon)\
**Post date:** [July 14, 2017, 6:40am UTC](https://discuss.elastic.co/t/date-histogram-buckets-keys-calculation/93127/1 "2017-07-14T06:40:37Z")

</div>

How does date histogram devide time to buckets?  
Example: interval 110m  
I know that If I have GMT timezone then I could start splitting time from Epoch (1970.01.01 GMT)  
e.g. 1970.01.01 + 110m + 110m + 110m..  
If I have timezone with positive offset (e.g. Europe/Moscow).. then I have to use Epoch 1970.01.01 +004  
and calculate [1970.01.01 +004] + 110m + 110m + 110m...  
but if I have timezone with negative offset like "America/Los\_Angeles" then Epoch time is not working... at least I can't calculate correct buckets values in the way I have described in elastic search 2.4

Could anyone give me some explanation?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 11, 2017, 6:40am UTC](https://discuss.elastic.co/t/date-histogram-buckets-keys-calculation/93127/2 "2017-08-11T06:40:56Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
