MCPcopy Index your code
hub / github.com/expr-lang/expr / TestWithTimezone_now

Function TestWithTimezone_now

patcher/with_timezone_test.go:21–28  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

19}
20
21func TestWithTimezone_now(t *testing.T) {
22 program, err := expr.Compile(`now()`, expr.Timezone("Asia/Kamchatka"))
23 require.NoError(t, err)
24
25 out, err := expr.Run(program, nil)
26 require.NoError(t, err)
27 require.Equal(t, "Asia/Kamchatka", out.(time.Time).Location().String())
28}

Callers

nothing calls this directly

Calls 7

CompileFunction · 0.92
TimezoneFunction · 0.92
NoErrorFunction · 0.92
RunFunction · 0.92
EqualFunction · 0.92
StringMethod · 0.65
LocationMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…