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

Function DecodeTimeTZDescending

pkg/util/encoding/encoding.go:992–1002  ·  view source on GitHub ↗

DecodeTimeTZDescending is the descending version of DecodeTimeTZAscending.

(b []byte)

Source from the content-addressed store, hash-verified

990
991// DecodeTimeTZDescending is the descending version of DecodeTimeTZAscending.
992func DecodeTimeTZDescending(b []byte) ([]byte, timetz.TimeTZ, error) {
993 b, unixMicros, offsetSecs, err := decodeTimeTZ(b)
994 if err != nil {
995 return nil, timetz.TimeTZ{}, err
996 }
997 // Do not use timeofday.FromInt, as it loses 24:00:00 encoding.
998 return b, timetz.TimeTZ{
999 TimeOfDay: timeofday.TimeOfDay(^unixMicros - int64(^offsetSecs)*offsetSecsToMicros),
1000 OffsetSecs: ^offsetSecs,
1001 }, nil
1002}
1003
1004func decodeTimeTZ(b []byte) ([]byte, int64, int32, error) {
1005 if PeekType(b) != TimeTZ {

Callers 1

prettyPrintFirstValueFunction · 0.85

Calls 2

TimeOfDayTypeAlias · 0.92
decodeTimeTZFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…