# Date processor timezone config problem

**URL:** <https://discuss.elastic.co/t/date-processor-timezone-config-problem/201575>\
**Category:** Elasticsearch\
**Created:** [September 30, 2019, 6:15am UTC](https://discuss.elastic.co/t/date-processor-timezone-config-problem/201575 "2019-09-30T06:15:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ztyzbb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ztyzbb/32/55093_2.png) [@ztyzbb](https://discuss.elastic.co/u/ztyzbb)\
**Post date:** [September 30, 2019, 6:15am UTC](https://discuss.elastic.co/t/date-processor-timezone-config-problem/201575/1 "2019-09-30T06:15:19Z")

</div>

I'm trying to index Logstash log with filebeat Logstash module. Everything works fine except @timestamp.

This is origin log text:  
[2019-09-30T09:22:27,323][DEBUG][org.logstash.beats.BeatsHandler] [local: 0:0:0:0:0:0:0:1:5044, remote: 0:0:0:0:0:0:0:1:7675] Sending a new message for the listener, sequence: 612

The timestamp comes without timezone, which is +08:00. So in fact, the time part should be:  
2019-09-30T09:22:27,323+0800

In default pipeline, it process timestamp like this:  
{  
"date": {  
"field": "logstash.log.timestamp",  
"target\_field": "@timestamp",  
"formats": [  
"ISO8601"  
],  
"ignore\_failure": true  
}  
},  
{  
"date": {  
"if": "ctx.event.timezone != null",  
"field": "@timestamp",  
"formats": ["ISO8601"],  
"timezone": "{{ event.timezone }}",  
"on\_failure": [{"append": {"field": "error.message", "value": "{{ \_ingest.on\_failure\_message }}"}}]  
}  
},

The event.timezone is "+08:00", and it works fine. But in Elasticsearch, the @timestamp is  
2019-09-30T17:22:27,323+0800  
which is 8 hours later. So there is something wrong.

I found simliar problem in [https://discuss.elastic.co/t/filebeat-7-3-syslog-auth-log-timezone-parsing-error/196031](https://discuss.elastic.co/t/filebeat-7-3-syslog-auth-log-timezone-parsing-error/196031), so I change to a more simple configuation to avoid it, like this:  
{  
"date" : {  
"field" : "logstash.log.timestamp",  
"target\_field" : "@timestamp",  
"formats" : [  
"ISO8601"  
],  
"timezone" : "+08:00",  
"on\_failure" : [{"append" : {"field" : "error.message","value" : "{{ \_ingest.on\_failure\_message }}"}}]  
}  
}

But nothing changed, date processor always read field that doesn't come with timezone in UTC, and offset to timezone I set in pipeline, and then output. So the time will never be correct. My problem is can I make date processor to read the time string with timezone I set. Instead of UTC, I don't care what timezone the output is, because the output always contians timezone information, so Kibana can convert correctly.

---

<div class="post-metadata">

**Author:** ![andreastoom](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@andreastoom](https://discuss.elastic.co/u/andreastoom)\
**Post date:** [October 3, 2019, 5:01am UTC](https://discuss.elastic.co/t/date-processor-timezone-config-problem/201575/2 "2019-10-03T05:01:12Z")

</div>

Hi,

I am running into the exact same issue when running Filebeat and Elasticsearch 7.3.2. I think this has been identified as a bug and there is work in progress for resolving the issue here: [https://github.com/elastic/beats/issues/13877](https://github.com/elastic/beats/issues/13877)

/Andreas

---

<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:** [October 31, 2019, 5:01am UTC](https://discuss.elastic.co/t/date-processor-timezone-config-problem/201575/3 "2019-10-31T05:01:13Z")

</div>

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