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

Function EncodeUntaggedTimeValue

pkg/util/encoding/encoding.go:1905–1908  ·  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

1903// EncodeUntaggedTimeValue encodes a time.Time value, appends it to the supplied buffer,
1904// and returns the final buffer.
1905func EncodeUntaggedTimeValue(appendTo []byte, t time.Time) []byte {
1906 appendTo = EncodeNonsortingStdlibVarint(appendTo, t.Unix())
1907 return EncodeNonsortingStdlibVarint(appendTo, int64(t.Nanosecond()))
1908}
1909
1910// EncodeTimeTZValue encodes a timetz.TimeTZ value with its value tag, appends it to
1911// 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…