# \_ingest.timestamp does not match my local time

**URL:** <https://discuss.elastic.co/t/ingest-timestamp-does-not-match-my-local-time/346600>\
**Category:** Elasticsearch\
**Tags:** ingest-pipeline\
**Created:** [November 7, 2023, 7:52am UTC](https://discuss.elastic.co/t/ingest-timestamp-does-not-match-my-local-time/346600 "2023-11-07T07:52:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JasonREC](https://avatars.discourse-cdn.com/v4/letter/j/858c86/32.png) [@JasonREC](https://discuss.elastic.co/u/JasonREC)\
**Post date:** [November 7, 2023, 7:52am UTC](https://discuss.elastic.co/t/ingest-timestamp-does-not-match-my-local-time/346600/1 "2023-11-07T07:52:11Z")

</div>

I am currently in GMT+8 time zone,

I have created this pipeline so that when indexing new document, the new document is created with a timestamp

```auto
PUT _ingest/pipeline/add-current-time
{
  "processors": [
    {
      "set": {
        "field": "@timestamp",
        "value": "{{{_ingest.timestamp}}}"
      }
    }
  ]
}

```

But the @timestamp field does not match to my local time

```auto
hits": [
      {
   
        "_score": 1,
        "_source": {
          "Error_message": "KEY Incorrect",
          "@timestamp": "2023-11-07T06:23:18.069057819Z",
        }
      },

```

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [November 7, 2023, 7:58am UTC](https://discuss.elastic.co/t/ingest-timestamp-does-not-match-my-local-time/346600/2 "2023-11-07T07:58:07Z")

</div>

All [timestamps in Elasticsearch are by requirement in the UTC timezone](https://www.elastic.co/guide/en/elasticsearch/reference/8.10/date.html).

---

<div class="post-metadata">

**Author:** ![JasonREC](https://avatars.discourse-cdn.com/v4/letter/j/858c86/32.png) [@JasonREC](https://discuss.elastic.co/u/JasonREC)\
**Post date:** [November 7, 2023, 8:11am UTC](https://discuss.elastic.co/t/ingest-timestamp-does-not-match-my-local-time/346600/3 "2023-11-07T08:11:20Z")

</div>

Hi @Christian_Dahlqvist ,

Thanks for the reply.

Does that mean the timestamp is always to be UTC+0, if I want the date-time field to be UTC+8, I have to manully index by my self?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [November 7, 2023, 8:15am UTC](https://discuss.elastic.co/t/ingest-timestamp-does-not-match-my-local-time/346600/4 "2023-11-07T08:15:47Z")

</div>

You can specify the time zone as part of the string if you set it yourself (instead of the `Z` that indicates UTC), but it will be converted and stored as UTC internally anyway. The `_ingest.timestamp` field is as far as I know always in UTC. If you want it to be anything else I believe you will need to change it after it has been assigned to your field.

---

<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:** [December 5, 2023, 8:16am UTC](https://discuss.elastic.co/t/ingest-timestamp-does-not-match-my-local-time/346600/5 "2023-12-05T08:16:31Z")

</div>

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