MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / DecodeUntaggedTimeValue

Function DecodeUntaggedTimeValue

pkg/util/encoding/encoding.go:2986–2997  ·  view source on GitHub ↗

DecodeUntaggedTimeValue decodes a value encoded by EncodeUntaggedTimeValue.

(b []byte)

Source from the content-addressed store, hash-verified

2984
2985// DecodeUntaggedTimeValue decodes a value encoded by EncodeUntaggedTimeValue.
2986func DecodeUntaggedTimeValue(b []byte) (remaining []byte, t time.Time, err error) {
2987 var sec, nsec int64
2988 b, _, sec, err = DecodeNonsortingStdlibVarint(b)
2989 if err != nil {
2990 return b, time.Time{}, err
2991 }
2992 b, _, nsec, err = DecodeNonsortingStdlibVarint(b)
2993 if err != nil {
2994 return b, time.Time{}, err
2995 }
2996 return b, timeutil.Unix(sec, nsec), nil
2997}
2998
2999// DecodeTimeTZValue decodes a value encoded by EncodeTimeTZValue.
3000func DecodeTimeTZValue(b []byte) (remaining []byte, t timetz.TimeTZ, err error) {

Callers 1

DecodeTimeValueFunction · 0.85

Calls 2

UnixFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…