# Ingest Pipeline - Date Processor Timezone

**URL:** <https://discuss.elastic.co/t/ingest-pipeline-date-processor-timezone/329457>\
**Category:** Kibana\
**Created:** [April 5, 2023, 7:40pm UTC](https://discuss.elastic.co/t/ingest-pipeline-date-processor-timezone/329457 "2023-04-05T19:40:49Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![tmslara.a](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tmslara.a/32/116339_2.png) [@tmslara.a](https://discuss.elastic.co/u/tmslara.a)\
**Post date:** [April 5, 2023, 7:40pm UTC](https://discuss.elastic.co/t/ingest-pipeline-date-processor-timezone/329457/1 "2023-04-05T19:40:49Z")

</div>

Hello,

I'm trying to configure an ingest pipeline using Kibana. I'm ingesting data into Elasticsearch using filebeat and this pipeline. Among other fields, I'm ingesting the document's timestamp. To "parse" the date from the input into Elasticsearch I'm using the Date processor. I want to specify that the timestamp that I'm ingesting is not in UTC but in my server's local timezone.

How can I configure the processor to use my local timezone?

Best regards,

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [April 5, 2023, 8:10pm UTC](https://discuss.elastic.co/t/ingest-pipeline-date-processor-timezone/329457/2 "2023-04-05T20:10:27Z")

</div>

> [@tmslara.a](#):
>
> How can I configure the processor to use my local timezone?

You need to use the `timezone` option as described in the [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/date-processor.html#date-processor).

---

<div class="post-metadata">

**Author:** ![tmslara.a](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tmslara.a/32/116339_2.png) [@tmslara.a](https://discuss.elastic.co/u/tmslara.a)\
**Post date:** [April 5, 2023, 8:32pm UTC](https://discuss.elastic.co/t/ingest-pipeline-date-processor-timezone/329457/3 "2023-04-05T20:32:16Z")

</div>

Thank you for your answer. I understand that I have to configure the timezone option. However, I'm not sure of the option that I should specify to set the timezone to 'local' or 'browser'

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [April 5, 2023, 9:31pm UTC](https://discuss.elastic.co/t/ingest-pipeline-date-processor-timezone/329457/4 "2023-04-05T21:31:26Z")

</div>

> [@tmslara.a](#):
>
> However, I'm not sure of the option that I should specify to set the timezone to 'local' or 'browser'

The timezone in the date processor should be set to the timezone of your log that is using your server local timezone as you said.

So you need to get the name of the timezone that your server is and put this in the timezone option in the date processor.

For example, if the timestamp in the logs messages are in the New York timezone, you would use `America/New_York` in the date processor.

---

<div class="post-metadata">

**Author:** ![tmslara.a](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tmslara.a/32/116339_2.png) [@tmslara.a](https://discuss.elastic.co/u/tmslara.a)\
**Post date:** [April 5, 2023, 9:57pm UTC](https://discuss.elastic.co/t/ingest-pipeline-date-processor-timezone/329457/5 "2023-04-05T21:57:26Z")

</div>

Thanks.

I set my timezone manually and it worked. I wanted to know if this timezone could be automatically set based on my server. As far as I understand (from your answert) it is not possible.

However, this is the solution. Thanks again.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [April 5, 2023, 10:37pm UTC](https://discuss.elastic.co/t/ingest-pipeline-date-processor-timezone/329457/6 "2023-04-05T22:37:25Z")

</div>

> [@tmslara.a](#):
>
> Thanks.
> 
> I set my timezone manually and it worked. I wanted to know if this timezone could be automatically set based on my server. As far as I understand (from your answert) it is not possible.
> 
> However, this is the solution. Thanks again.

What are you using to ship the logs to elasticsearch?

Filebeat or Elastic Agent should do this for you assuming your server has the correct timezone

---

<div class="post-metadata">

**Author:** ![tmslara.a](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tmslara.a/32/116339_2.png) [@tmslara.a](https://discuss.elastic.co/u/tmslara.a)\
**Post date:** [April 6, 2023, 1:53pm UTC](https://discuss.elastic.co/t/ingest-pipeline-date-processor-timezone/329457/7 "2023-04-06T13:53:33Z")

</div>

I'm using filebeat

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [April 6, 2023, 3:48pm UTC](https://discuss.elastic.co/t/ingest-pipeline-date-processor-timezone/329457/8 "2023-04-06T15:48:39Z")

</div>

So check the timezone of the server.... filebeat uses the timezone of the server when it ships logs, it does convert that to UTC

so you can test this by setting [adding the locale](https://www.elastic.co/guide/en/beats/filebeat/current/add-locale.html)

```auto
processors:
  - add_locale: ~

```

And then run and look at the output and check to see if it is accurate

example

`{"@timestamp":"2023-04-06T15:46:19.877Z","@metadata":{"beat":"filebeat","type":"_doc","version":"8.6.2"},"event":{"timezone":"-07:00"} ....`

---

<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:** [May 4, 2023, 3:49pm UTC](https://discuss.elastic.co/t/ingest-pipeline-date-processor-timezone/329457/9 "2023-05-04T15:49:32Z")

</div>

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