# Automatic Date conversion at load time?

**URL:** <https://discuss.elastic.co/t/automatic-date-conversion-at-load-time/56539>\
**Category:** Elasticsearch\
**Created:** [July 27, 2016, 3:02pm UTC](https://discuss.elastic.co/t/automatic-date-conversion-at-load-time/56539 "2016-07-27T15:02:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![samatthias](https://avatars.discourse-cdn.com/v4/letter/s/c0e974/32.png) [@samatthias](https://discuss.elastic.co/u/samatthias)\
**Post date:** [July 27, 2016, 3:02pm UTC](https://discuss.elastic.co/t/automatic-date-conversion-at-load-time/56539/1 "2016-07-27T15:02:42Z")

</div>

Hi Everyone

I have a question to implicit date conversion. Is it possible that EL 1.7 does automatically convert a local time to utc time?  
My POST to the index does look like this (it's a locale time in my timezone):

[...]  
"loadDate": "2016-07-27 10:00:04",  
[...]

But Elasticsearch stores something like this (search result):

[...]  
"loadDate": "2016-07-27T08:00:04.000Z",  
[...]

And the correspondig mapping to the entry aboe looks like this:  
"loadDate": {  
"type": "date",  
"format": "dateOptionalTime"  
}

Thanks for your answer.

Best regards  
Matt

---

<div class="post-metadata">

**Author:** ![thiago](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thiago/32/32096_2.png) [@thiago](https://discuss.elastic.co/u/thiago)\
**Post date:** [July 27, 2016, 7:19pm UTC](https://discuss.elastic.co/t/automatic-date-conversion-at-load-time/56539/2 "2016-07-27T19:19:05Z")

</div>

Hello samatthias,

Yes, elasticsearch will parse that date using system default's timezone (as the input value does not specifies it) and convert it to UTC.

Cheers

---

<div class="post-metadata">

**Author:** ![samatthias](https://avatars.discourse-cdn.com/v4/letter/s/c0e974/32.png) [@samatthias](https://discuss.elastic.co/u/samatthias)\
**Post date:** [July 28, 2016, 11:30am UTC](https://discuss.elastic.co/t/automatic-date-conversion-at-load-time/56539/3 "2016-07-28T11:30:45Z")

</div>

Hi Thiago

Thanks for your clarification. Then I'm on the sunny side 🙂 and I don't have to convert it before loading.

Best regards  
Matt

---

<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:** [July 5, 2017, 10:32pm UTC](https://discuss.elastic.co/t/automatic-date-conversion-at-load-time/56539/4 "2017-07-05T22:32:06Z")

</div>


