# Timelion - Incorrect metrics for a given date and server timezone effects

**URL:** https://discuss.elastic.co/t/timelion-incorrect-metrics-for-a-given-date-and-server-timezone-effects/206486
**Category:** Kibana
**Tags:** timelion
**Created:** [November 4, 2019, 9:45pm UTC](https://discuss.elastic.co/t/timelion-incorrect-metrics-for-a-given-date-and-server-timezone-effects/206486 "2019-11-04T21:45:25Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![crpj](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@crpj](https://discuss.elastic.co/u/crpj)
#### Post date: [November 4, 2019, 9:45pm UTC](https://discuss.elastic.co/t/timelion-incorrect-metrics-for-a-given-date-and-server-timezone-effects/206486/1 "2019-11-04T21:45:25Z")

</div>

Hello,

I have an issue with timezone conversion in timelion, I care about event dates only (no hours) so I ingested data via logstash using date filter as follows:

> date {  
> match =\> ["EVENT\_START\_DATE", "yyyyMMdd"]  
> timezone =\> "UTC"  
> target =\> "@timestamp"  
> }

In Kibana advanced settings I set UTC timezone as well. I have checked Data table and Charts and they show the metrics correctly for each day, however, Timelion **disregarded** the Advanced Settings and considered the server timezone (UTC -03:00). Changing the server's timezone to UTC seemed to help, but metric values are still being shown on incorrect dates regardless of the Interval used.

#Query results for reference

> {  
> "key" : 1570665600000,  
> "key\_as\_string" : "20191010",  
> "doc\_count" : 8,  
> "SUM\_AMOUNT" : {  
> **"value" : 158.89230865366153**  
> }  
> },  
> {  
> "key" : 1570579200000,  
> **"key\_as\_string" : "20191009",**  
> "doc\_count" : 6,  
> "SUM\_AMOUNT" : {  
> **"value" : 432.98415810004917**  
> }  
> }

> #timelion query - consider just the AMOUNT metric for this post  
> .es(split=TRAFFIC\_TYPE:3,index=aggregated-teste, timefield=EVENT\_START\_DATE, metric=sum:CALL\_COUNT, metric=sum:CHARGED\_USAGE, metric=sum:DATA\_VOLUME, metric=sum:AMOUNT)

Kibana 7.3.2 (also tested with 7.4.0)

 ![timelion](https://us1.discourse-cdn.com/elastic/original/3X/d/c/dc426c46c22f4bd510a6d87e6b2459ad00bdf9b6.jpeg)

Is timelion capable of handling only dates correctly? I wanted to use a simple line chart but it does not have the Offset feature I will need.

---

<div class="post-metadata">

### Author: ![mattkime](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mattkime/32/43522_2.png) [@mattkime](https://discuss.elastic.co/u/mattkime)
#### Post date: [November 4, 2019, 10:29pm UTC](https://discuss.elastic.co/t/timelion-incorrect-metrics-for-a-given-date-and-server-timezone-effects/206486/2 "2019-11-04T22:29:30Z")

</div>

It looks like this has been fixed recently and will be in the upcoming 7.6 release. Apologies for the trouble.

> <https://github.com/elastic/kibana/pull/47813>

---

<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: [December 2, 2019, 10:34pm UTC](https://discuss.elastic.co/t/timelion-incorrect-metrics-for-a-given-date-and-server-timezone-effects/206486/3 "2019-12-02T22:34:07Z")

</div>

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