# Problem with time mappings

**URL:** <https://discuss.elastic.co/t/problem-with-time-mappings/74095>\
**Category:** Elasticsearch\
**Created:** [February 6, 2017, 4:58pm UTC](https://discuss.elastic.co/t/problem-with-time-mappings/74095 "2017-02-06T16:58:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marten](https://avatars.discourse-cdn.com/v4/letter/m/4af34b/32.png) [@Marten](https://discuss.elastic.co/u/Marten)\
**Post date:** [February 6, 2017, 4:58pm UTC](https://discuss.elastic.co/t/problem-with-time-mappings/74095/1 "2017-02-06T16:58:42Z")

</div>

Hi,

I have trouble with getting a correct timestamp in my index.  
Whatever I try, the timefield in my index is one hour higher than the timestamp I push into the index.

If I push this string "20170206172656596" into this mapping:

"Time": {  
"type": "date",  
"format": "yyyyMMddHHmmssSSS"}

I get this timestamp in ES: "February 6th 2017, 18:26:56.596"  
So, exactly one hour later.

I'm running the latest version of Elasticsearch (5.2)  
I'm sure it must be something with my locale settings, but I just can't find it.  
Any help with this would be very welcome.

Marten

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [February 7, 2017, 7:55am UTC](https://discuss.elastic.co/t/problem-with-time-mappings/74095/2 "2017-02-07T07:55:10Z")

</div>

Hey,

internally all dates are treated as UTC. You have not specified a time zone on indexing. You might want to use a [date processor](https://www.elastic.co/guide/en/elasticsearch/reference/5.2/date-processor.html) to fix the timezone before indexing.

--Alex

---

<div class="post-metadata">

**Author:** ![Marten](https://avatars.discourse-cdn.com/v4/letter/m/4af34b/32.png) [@Marten](https://discuss.elastic.co/u/Marten)\
**Post date:** [February 8, 2017, 6:59am UTC](https://discuss.elastic.co/t/problem-with-time-mappings/74095/3 "2017-02-08T06:59:28Z")

</div>

Hi Alex,

Thanks.  
I somehow misinterpreted the documentation on this.  
I'got it working correctly now.

Marten

---

<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:** [March 8, 2017, 6:59am UTC](https://discuss.elastic.co/t/problem-with-time-mappings/74095/4 "2017-03-08T06:59:37Z")

</div>

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