Hello everyone.
I have a timezone field in my data schema.
Example: timezone: "Los Angles"
Is it possible to create a scripted field and get the UTC offset from it?
Thanks in advance for your future responses.
Hello everyone.
I have a timezone field in my data schema.
Example: timezone: "Los Angles"
Is it possible to create a scripted field and get the UTC offset from it?
Thanks in advance for your future responses.
By UTC offset you mean the difference of hours/minutes etc between your timezone and UTC? Unfortunately I don't think it's possible. You would have to make the changes in how you ingest your data (either ingesting utc_time too, for example kibana_sample_data_logs does that) or ingest directly a numeric timezone
field.
If there is a way, you may use java.time.zone. There are some function to get offset from ZoneId.
"Using Datetime in Painless" would help you.
In addition, I wonder the timezone ID could be "America/Los_Angeles" and I'm not sure you have to convert from "Los Angeles".
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
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.