Create Timefield with current time zone

"eventTime": [

How can i, using e.g scripted field create an eventTime2 which gives me the time in a different timezone ?

Scripted fields are executed in Elasticsearch and Elasticsearch stores dates in UTC. Kibana does its timezone conversion in the browser, so Elasticsearch doesn't know anything about it. If you want to return the eventTime2 in a particular timezone you can use the Java date time APIs via Painless.

@Bargs let me know if this is right approach or if you can guide more here.


Yes, you can find a guide for working with date fields in Painless here:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.