# Custom Time Zone Error

**URL:** <https://discuss.elastic.co/t/custom-time-zone-error/138958>\
**Category:** Kibana\
**Created:** [July 6, 2018, 4:47pm UTC](https://discuss.elastic.co/t/custom-time-zone-error/138958 "2018-07-06T16:47:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mc1392](https://avatars.discourse-cdn.com/v4/letter/m/57b2e6/32.png) [@mc1392](https://discuss.elastic.co/u/mc1392)\
**Post date:** [July 6, 2018, 4:47pm UTC](https://discuss.elastic.co/t/custom-time-zone-error/138958/1 "2018-07-06T16:47:29Z")

</div>

I keep getting the following error:  
`does not support custom time zones`

and  
`[illegal_argument_exception] Field [EntryDateTime] of type [text] does not support custom time zones`

How should I format my dates/times?

This is the data I have:

> BadgeID,FirstName,LastName,SessionNumber,EventDate,EntryDateTime,ExitDateTime  
> 212326,Doe,John,PG10,2018-18-05 00:00:00.0,2018-18-05 09:45:00.0,2018-18-05 11:19:00.0  
> 214633,Doe,Jane,PG10,2018-18-05 00:00:00.0,2018-18-05 08:40:00.0,2018-18-05 11:19:00.0

---

<div class="post-metadata">

**Author:** ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)\
**Post date:** [July 6, 2018, 4:53pm UTC](https://discuss.elastic.co/t/custom-time-zone-error/138958/2 "2018-07-06T16:53:17Z")

</div>

What does your index mapping look like for this data set? It looks like your date/time fields are being treated as `text` as opposed to `date` fields. Try separating the date/time with an uppercase "T" instead of a space, and see if that helps.

So `2018-18-05 11:19:00.0` becomes `2018-18-05T11:19:00.0`

---

<div class="post-metadata">

**Author:** ![mc1392](https://avatars.discourse-cdn.com/v4/letter/m/57b2e6/32.png) [@mc1392](https://discuss.elastic.co/u/mc1392)\
**Post date:** [July 6, 2018, 5:21pm UTC](https://discuss.elastic.co/t/custom-time-zone-error/138958/3 "2018-07-06T17:21:07Z")

</div>

I just set the mapping:

```
PUT tracking/_mapping/doc
{
  "properties": {
    "EntryDateTime": { 
      "type": "date"
    },
     "ExitDateTime": { 
      "type": "date"
    },
    "EventDate": { 
      "type": "date"
    }
  }
}
```

---

<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:** [August 3, 2018, 5:21pm UTC](https://discuss.elastic.co/t/custom-time-zone-error/138958/4 "2018-08-03T17:21:08Z")

</div>

Closed on August 3, 2018, 5:21pm UTC

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