# Parse date format with timezone CST

**URL:** <https://discuss.elastic.co/t/parse-date-format-with-timezone-cst/182118>\
**Category:** Elasticsearch\
**Created:** [May 22, 2019, 3:22am UTC](https://discuss.elastic.co/t/parse-date-format-with-timezone-cst/182118 "2019-05-22T03:22:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![phelim13](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/phelim13/32/46585_2.png) [@phelim13](https://discuss.elastic.co/u/phelim13)\
**Post date:** [May 22, 2019, 3:22am UTC](https://discuss.elastic.co/t/parse-date-format-with-timezone-cst/182118/1 "2019-05-22T03:22:41Z")

</div>

hello,

in my case, my log insert logTime like **19-5-21 11:00:00:000 CST**  
I parse date with format **yy-M-d HH:mm:ss:SSS zzz**  
everything is looks good

but when I query this date field, I found that timezone is wrong  
because I want CST( **C** hina **S** tandard **T** ime) =\> UTC+8  
not CST( **C** entral **S** tandard **T** ime) =\> UTC-5  
Is there any way to solve this problem?

---

<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:** [May 22, 2019, 7:59am UTC](https://discuss.elastic.co/t/parse-date-format-with-timezone-cst/182118/2 "2019-05-22T07:59:03Z")

</div>

Hey,

what Elasticsearch version are you trying this on?

--Alex

---

<div class="post-metadata">

**Author:** ![phelim13](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/phelim13/32/46585_2.png) [@phelim13](https://discuss.elastic.co/u/phelim13)\
**Post date:** [May 23, 2019, 7:15am UTC](https://discuss.elastic.co/t/parse-date-format-with-timezone-cst/182118/3 "2019-05-23T07:15:53Z")

</div>

Hello,

I using Elasticsearch 6.3.0

---

<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:** [May 23, 2019, 1:48pm UTC](https://discuss.elastic.co/t/parse-date-format-with-timezone-cst/182118/4 "2019-05-23T13:48:05Z")

</div>

It does not look like joda time is interpreting CST as china standard time, so I think the best way to solve this would be to specify the offset as `-08:00` and use `Z` in the format.

---

<div class="post-metadata">

**Author:** ![phelim13](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/phelim13/32/46585_2.png) [@phelim13](https://discuss.elastic.co/u/phelim13)\
**Post date:** [May 24, 2019, 1:31am UTC](https://discuss.elastic.co/t/parse-date-format-with-timezone-cst/182118/5 "2019-05-24T01:31:19Z")

</div>

yes I think so too, but my dilemma is that LOG is not in my control. 😂  
Thanks for your reply

---

<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:** [May 28, 2019, 8:47am UTC](https://discuss.elastic.co/t/parse-date-format-with-timezone-cst/182118/6 "2019-05-28T08:47:26Z")

</div>

you could use an script ingest processor and modify the field then and replace CST with the offset.

---

<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:** [June 25, 2019, 8:47am UTC](https://discuss.elastic.co/t/parse-date-format-with-timezone-cst/182118/7 "2019-06-25T08:47:27Z")

</div>

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