# What's the @timestamp timezone from elasticsearch via curl query?

**URL:** <https://discuss.elastic.co/t/whats-the-timestamp-timezone-from-elasticsearch-via-curl-query/51859>\
**Category:** Elasticsearch\
**Created:** [June 4, 2016, 4:04pm UTC](https://discuss.elastic.co/t/whats-the-timestamp-timezone-from-elasticsearch-via-curl-query/51859 "2016-06-04T16:04:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefansaye](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@stefansaye](https://discuss.elastic.co/u/stefansaye)\
**Post date:** [June 4, 2016, 4:04pm UTC](https://discuss.elastic.co/t/whats-the-timestamp-timezone-from-elasticsearch-via-curl-query/51859/1 "2016-06-04T16:04:10Z")

</div>

hi all,

1.i know Kibana always adjusts the UTC time to the browser's timezone. but is the same as via curl to elasticsearch ?

2.Logstash generates indexes based on @timestamp with UTC time, if I want to get documents from  
2015-09-01 to 2015-09-02 with my timezone("Asia/Shanghai"+0800), I need to set range from 2015.08.31T16:00:00.000Z  
to 2015.09.02T16:00:00.000Z for elasticsearch via curl send the range query,Correct?

3.the return timestamp is UTC time ?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 5, 2016, 12:53am UTC](https://discuss.elastic.co/t/whats-the-timestamp-timezone-from-elasticsearch-via-curl-query/51859/2 "2016-06-05T00:53:12Z")

</div>

ES stores things in UTC, curl has no concept of a timezone.

---

<div class="post-metadata">

**Author:** ![stefansaye](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@stefansaye](https://discuss.elastic.co/u/stefansaye)\
**Post date:** [June 5, 2016, 2:25am UTC](https://discuss.elastic.co/t/whats-the-timestamp-timezone-from-elasticsearch-via-curl-query/51859/3 "2016-06-05T02:25:57Z")

</div>

if I want to get documents from  
2015-09-01 to 2015-09-02 with my timezone("Asia/Shanghai"+0800), I need to set range from 2015.08.31T16:00:00.000Z  
to 2015.09.02T16:00:00.000Z for elasticsearch, correct ?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [June 11, 2016, 4:59pm UTC](https://discuss.elastic.co/t/whats-the-timestamp-timezone-from-elasticsearch-via-curl-query/51859/4 "2016-06-11T16:59:09Z")

</div>

> if I want to get documents from  
> 2015-09-01 to 2015-09-02 with my timezone("Asia/Shanghai"+0800), I need to set range from 2015.08.31T16:00:00.000Z  
> to 2015.09.02T16:00:00.000Z for elasticsearch, correct ?

Yes.

> 3.the return timestamp is UTC time ?

Yes, unless you ask for something else (I don't remember if that's possible). It might also be possible to indicate the timezone of the timestamp you supply in the query. Check the docs.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 12, 2016, 8:53am UTC](https://discuss.elastic.co/t/whats-the-timestamp-timezone-from-elasticsearch-via-curl-query/51859/5 "2016-06-12T08:53:50Z")

</div>

ES only works with UTC, it's up to the client to convert.

---

<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:44pm UTC](https://discuss.elastic.co/t/whats-the-timestamp-timezone-from-elasticsearch-via-curl-query/51859/6 "2017-07-05T22:44:33Z")

</div>


