Hi i have a short_date field in the following format
09/Aug/2023:12:44:15 +0530
This field is created as text. To convert it to date i am doing the following
date {
match => [ "short_date", "dd/MMM/yyyy:HH:mm:ss Z" ]
target=> "short_date"
}
The field is getting saved as date but the time value is coming different
for the date 09/Aug/2023:12:44:15 +0530
the value is coming as 2023-08-09T07:14:15.000Z
Timing is different. Where is the mistake>
There is no error: I guess your local time is India Standard Time as the date shows +0530 and Elastic stores the dates always in the Zulu Time (Z). So your date was parsed correctly and then translated into the standard timezone.
In Kibana, you can configure the timezone that should be shown under advanced settings dateFormat:tz so you can view the date as you expect.
yes it had, when i added a .SSS to the date filter match pattern it again works the same way as it was in linux m/c. the time changes. I'm still not clear as to what has to be changed?
If anything, you should change Kibana timezone to show the date correctly. The ingest works correctly as it aligns incoming dates to a common timezone (Zulu) so that you can compare dates in docs from different countries(e.g. India and US).
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.