How to change timezone on painless script

Hello everyone,

i want to ask something about painless script. so i just made a painless script that look like this:

but unfortunately the result of this script is still in utc and i want to change it to another timezone for example GMT+7. How can i do it? what should i add on my script?

i'm using kibana v7.17


Hi @yuswanul !

Have you looked at this documentation about using Datetime in Painless?

There is a section called Datetime Zone(screenshot included). The timezone default is UTC but it looks like you can use methods with a ZoneID to change the timezone.

Hope this helps!

oh, thanks. i've seen that documentation before but i found so many case that match my need, So I'm confused about which one to use. I have tried some of them but it doesn't work. but thanks a lot for your help

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