mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 21:47:07 +00:00
Turn on DefaultUTCTimeZone for cel-go.
This commit is contained in:
parent
2f0e5af40b
commit
6883198898
@ -79,7 +79,7 @@ func getBaseEnv() (*cel.Env, error) {
|
|||||||
// Validate function declarations once during base env initialization,
|
// Validate function declarations once during base env initialization,
|
||||||
// so they don't need to be evaluated each time a CEL rule is compiled.
|
// so they don't need to be evaluated each time a CEL rule is compiled.
|
||||||
// This is a relatively expensive operation.
|
// This is a relatively expensive operation.
|
||||||
opts = append(opts, cel.EagerlyValidateDeclarations(true))
|
opts = append(opts, cel.EagerlyValidateDeclarations(true), cel.DefaultUTCTimeZone(true))
|
||||||
opts = append(opts, library.ExtensionLibs...)
|
opts = append(opts, library.ExtensionLibs...)
|
||||||
|
|
||||||
initEnv, initEnvErr = cel.NewEnv(opts...)
|
initEnv, initEnvErr = cel.NewEnv(opts...)
|
||||||
|
Loading…
Reference in New Issue
Block a user