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

Function timestampGetMilliseconds

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

Source from the content-addressed store, hash-verified

1040}
1041
1042func timestampGetMilliseconds(ts, tz ref.Val) ref.Val {
1043 t, err := inTimeZone(ts, tz)
1044 if err != nil {
1045 return types.NewErrFromString(err.Error())
1046 }
1047 return types.Int(t.Nanosecond() / 1000000)
1048}
1049
1050func inTimeZone(ts, tz ref.Val) (time.Time, error) {
1051 t := ts.(types.Timestamp)

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