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

Function EncodeTimeTZDescending

pkg/util/encoding/encoding.go:964–967  ·  view source on GitHub ↗

EncodeTimeTZDescending is the descending version of EncodeTimeTZAscending.

(b []byte, t timetz.TimeTZ)

Source from the content-addressed store, hash-verified

962
963// EncodeTimeTZDescending is the descending version of EncodeTimeTZAscending.
964func EncodeTimeTZDescending(b []byte, t timetz.TimeTZ) []byte {
965 // Do not use TimeOfDay's add function, as it loses 24:00:00 encoding.
966 return encodeTimeTZ(b, ^(int64(t.TimeOfDay) + int64(t.OffsetSecs)*offsetSecsToMicros), ^t.OffsetSecs)
967}
968
969func encodeTimeTZ(b []byte, unixMicros int64, offsetSecs int32) []byte {
970 b = append(b, timeTZMarker)

Callers

nothing calls this directly

Calls 1

encodeTimeTZFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…