# Logstash date timezone

**URL:** https://discuss.elastic.co/t/logstash-date-timezone/336803
**Category:** Logstash
**Created:** [June 24, 2023, 5:07am UTC](https://discuss.elastic.co/t/logstash-date-timezone/336803 "2023-06-24T05:07:20Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![Mahdi\_Davoodi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mahdi_davoodi/32/58581_2.png) [@Mahdi\_Davoodi](https://discuss.elastic.co/u/Mahdi_Davoodi)
#### Post date: [June 24, 2023, 5:07am UTC](https://discuss.elastic.co/t/logstash-date-timezone/336803/1 "2023-06-24T05:07:20Z")

</div>

I want to parse date-time records with logstash date filter. My records have Asia/Tehran time zone.  
After the recent changes in the time zone in Iran and the removal of DST from it, apparently my date of records does not parse correctly.  
For example, June 10, 2021 at 12:00 Tehran time should be 7:30 UTC, and June 10, 2023 at 12:00 Tehran time should be 8:30 UTC, but both are 7:30 UTC.

My logstash version is 8.8.1 and I tested it with versions 8.8.0 and 7.14.0 and the result was the same.

sample code:

```auto
echo "10 June 2021 12:00:00.000" | bin/logstash -e "filter { date { match => ['message', 'dd MMMM YYYY HH:mm:ss.SSS'] target => timeid timezone => 'Asia/Tehran' } }"
result:
"timeid" => 2021-06-10T07:30:00.000Z

echo "10 June 2023 12:00:00.000" | bin/logstash -e "filter { date { match => ['message', 'dd MMMM YYYY HH:mm:ss.SSS'] target => timeid timezone => 'Asia/Tehran' } }"
result:
"timeid" => 2023-06-10T07:30:00.000Z

```

---

_[View the full topic](https://discuss.elastic.co/t/logstash-date-timezone/336803)._
