MCPcopy Create free account
hub / github.com/cel-expr/cel-go / timestampGetSeconds

Function timestampGetSeconds

common/stdlib/standard.go:1034–1040  ·  view source on GitHub ↗
(ts, tz ref.Val)

Source from the content-addressed store, hash-verified

1032}
1033
1034func timestampGetSeconds(ts, tz ref.Val) ref.Val {
1035 t, err := inTimeZone(ts, tz)
1036 if err != nil {
1037 return types.NewErrFromString(err.Error())
1038 }
1039 return types.Int(t.Second())
1040}
1041
1042func timestampGetMilliseconds(ts, tz ref.Val) ref.Val {
1043 t, err := inTimeZone(ts, tz)

Callers 1

initStandardFunction · 0.70

Calls 4

NewErrFromStringFunction · 0.92
IntTypeAlias · 0.92
inTimeZoneFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected