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

Function EncodeUntaggedTimeValue

pkg/util/encoding/encoding.go:2667–2670  ·  view source on GitHub ↗

EncodeUntaggedTimeValue encodes a time.Time value, appends it to the supplied buffer, and returns the final buffer.

(appendTo []byte, t time.Time)

Source from the content-addressed store, hash-verified

2665// EncodeUntaggedTimeValue encodes a time.Time value, appends it to the supplied buffer,
2666// and returns the final buffer.
2667func EncodeUntaggedTimeValue(appendTo []byte, t time.Time) []byte {
2668 appendTo = EncodeNonsortingStdlibVarint(appendTo, t.Unix())
2669 return EncodeNonsortingStdlibVarint(appendTo, int64(t.Nanosecond()))
2670}
2671
2672// EncodeTimeTZValue encodes a timetz.TimeTZ value with its value tag, appends it to
2673// the supplied buffer, and returns the final buffer.

Callers 1

EncodeTimeValueFunction · 0.85

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…