In the old cluster, the timestamp is "@timestamp": "2024-08-12T17:40:31.098422413+08:00". For stability reasons, I still want to keep it after migrating to the new cluster. I have tried many filters like behind, but none of them work. The new cluster has always been "@timestamp": "2024-08-12T09:40:31.098Z". I don't know if it's because there is no match or some other reason.How to retain the time zone and nanoseconds format
date {
match => [ "@timestamp", "yyyy-MM-dd'T'HH:mm:ss.SSSSSSSSSZ" ]
timezone => "Asia/Shanghai"
target => "@timestamp"
}
Thank you for your suggestion to keep the nano format. I still want to know how to keep the time zone. I added the Shanghai time zone and it didn't work. I want to keep +8:00. The purpose is to keep the format of the full data and incremental data consistent to avoid possible problems in the future. Thank you very much for your advice.
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.