# Date histogram ignores timezone

**URL:** <https://discuss.elastic.co/t/date-histogram-ignores-timezone/231247>\
**Category:** Elasticsearch\
**Created:** [May 6, 2020, 4:15am UTC](https://discuss.elastic.co/t/date-histogram-ignores-timezone/231247 "2020-05-06T04:15:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Quang\_D\_Tr\_n](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/quang_d_tr_n/32/54722_2.png) [@Quang\_D\_Tr\_n](https://discuss.elastic.co/u/Quang_D_Tr_n)\
**Post date:** [May 6, 2020, 4:15am UTC](https://discuss.elastic.co/t/date-histogram-ignores-timezone/231247/1 "2020-05-06T04:15:16Z")

</div>

I have date field `"local_time": "2020-04-10T23:00:52.000-0600"` which stores the local time (various timezones).  
Now I want to use `date_histogram` to group data by day but it auto converts the above time to UTC and it will be grouped to 11 April, which is not really correct for me. Because there are many other timezones so I want to group them in the same day in local time.

Client can send all the timezones id but I don't know how to apply to the param timezone in `date_histogram` because there are more than 1.

Is there any way to achieve this?

---

<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:** [June 3, 2020, 4:27am UTC](https://discuss.elastic.co/t/date-histogram-ignores-timezone/231247/2 "2020-06-03T04:27:20Z")

</div>

Closed on June 3, 2020, 4:27am UTC

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