# Date time error

**URL:** https://discuss.elastic.co/t/date-time-error/213141
**Category:** Elasticsearch
**Created:** [December 27, 2019, 6:42am UTC](https://discuss.elastic.co/t/date-time-error/213141 "2019-12-27T06:42:25Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![ashley11](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@ashley11](https://discuss.elastic.co/u/ashley11)
#### Post date: [December 27, 2019, 6:42am UTC](https://discuss.elastic.co/t/date-time-error/213141/1 "2019-12-27T06:42:26Z")

</div>

Hi,

I'm new to kibana.  
I did some visualizations too. But I'm facing below issue,  
my date time in json is ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/c/1c43a3da9ac987e670080ff6f794436e954b346b.png)

but in kibana it is showing some different time like,  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/d/9dbcbb31feb633739a5ccfa61bc98598846a91cb.png)  
can you pls help me out

my time zone is  
India Standard Time

Time zone in Pune, Maharashtra (GMT+5:30)

Friday, 27 December 2019, 12:11 pm

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [December 27, 2019, 8:13am UTC](https://discuss.elastic.co/t/date-time-error/213141/2 "2019-12-27T08:13:10Z")

</div>

Elasticsearch assumes UTC dates. The JSON document you shared is then UTC based as no explicit timezone has been defined in `@timestamp` field.  
Kibana uses your browser settings I think to display dates in your timezone.

---

<div class="post-metadata">

### Author: ![ashley11](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@ashley11](https://discuss.elastic.co/u/ashley11)
#### Post date: [December 30, 2019, 5:24am UTC](https://discuss.elastic.co/t/date-time-error/213141/3 "2019-12-30T05:24:32Z")

</div>

hi @David,  
Thanks for the reply how can i define timezone in my index pattern or in the JSON file.  
in the index i have mentioned like  
"@timestamp": {  
"type": "date"  
can i put field like "time\_zone" here  
}

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [December 30, 2019, 6:17am UTC](https://discuss.elastic.co/t/date-time-error/213141/4 "2019-12-30T06:17:47Z")

</div>

Ideally you put the timezone in the document itself not in the mapping. Something like

```
1994-11-05T08:15:30-05:00

```

(I'm not sure about the exact format though)

If you can't modify the source, you can use an ingest pipeline and this processor may be: [https://www.elastic.co/guide/en/elasticsearch/reference/7.5/date-processor.html](https://www.elastic.co/guide/en/elasticsearch/reference/7.5/date-processor.html)

---

<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: [January 27, 2020, 6:17am UTC](https://discuss.elastic.co/t/date-time-error/213141/5 "2020-01-27T06:17:53Z")

</div>

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