How to change the time zone of OPA Built-in Function - Time.clock() #425
Answered
by
charlieegan3
JinXiu2023
asked this question in
OPA and Rego
-
Hello, I got a problem when I use the function -time.clock(). I want to get the time in Asia/Shanghai, but I always get the time 8 hours later than Shanghai's time even though I have changed the POD's time zone. I need your help and thank you anyway. |
Beta Was this translation helpful? Give feedback.
Answered by
charlieegan3
May 18, 2023
Replies: 1 comment 6 replies
-
Hey, how about something like this: https://play.openpolicyagent.org/p/LvzRDk66Rg t := time.clock([time.now_ns(), "Asia/Shanghai"]) |
Beta Was this translation helpful? Give feedback.
6 replies
Answer selected by
JinXiu2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey, how about something like this: https://play.openpolicyagent.org/p/LvzRDk66Rg