Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong timezone #157

Open
88107251 opened this issue Jun 24, 2023 · 0 comments
Open

wrong timezone #157

88107251 opened this issue Jun 24, 2023 · 0 comments
Labels

Comments

@88107251
Copy link

88107251 commented Jun 24, 2023

Logstash information:

  1. Logstash version: 8.8.1
  2. Logstash installation source: expanded from tar archive
  3. Logstash being run Via command line
  4. Logstash using the bundled JDK

Description of the problem including expected versus actual behavior:
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:

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
correct result:
"timeid" => 2023-06-10T08:30:00.000Z

link of issue in elastic forum:
https://discuss.elastic.co/t/logstash-date-timezone/336803

tnx

@88107251 88107251 added the bug label Jun 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant