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.
So the country changed own time zone?
Well someone in Ruby/Java should correct that in the code.
The documentation: The valid IDs are listed on the Joda.org available time zones page.
Until then you can use hardcoded values like timezone => "+03:30" and add few IFs which will handle that.
The code with timezone => "+03:30" means UTC+03:30(pure sum), it doesn't matter is daylight saving time or not. With the JODA timezone, DST is corrected automatically.
If I remember correctly, I had tested for Turkey is corrected, it's always UTC+03:00 now (from 2017), but i.e. Berlin has UTC+01:00 or UTC+02:00 in DST.
Yes, Iran abolished its DST(Daylight saving time) from March 2023.
But the main problem is that the time of my records are from 1980 to 2023 and I want the date filter to behave correctly with all of them. So I can't use timezone => "+03:30" on all records.
The tz data should know the historical record of timezone changes. For example, zdump -i Australia/Queensland show that DST was used in Queensland during WW1 and WW2 (very common) and tried in the 1990's (it was then rejected by referendum)
The release notes for the 2022b tzinfo (August 2022) states that "Iran plans to stop observing DST permanently, after it falls back on 2022-09-21" but the tz files in my system do not reflect that (or changes from 1935 onwards).
I do not know why the tzinfo file for Tehran do not have the history.
Are you using the bundled JDK or are you using another JDK? If you are using another JDK maybe the version you are using does not have the timezone update.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.