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

Function DecodeTimeAscending

pkg/util/encoding/encoding.go:1230–1236  ·  view source on GitHub ↗

DecodeTimeAscending decodes a time.Time value which was encoded using EncodeTime. The remainder of the input buffer and the decoded time.Time are returned.

(b []byte)

Source from the content-addressed store, hash-verified

1228// EncodeTime. The remainder of the input buffer and the decoded
1229// time.Time are returned.
1230func DecodeTimeAscending(b []byte) ([]byte, time.Time, error) {
1231 b, sec, nsec, err := decodeTime(b)
1232 if err != nil {
1233 return b, time.Time{}, err
1234 }
1235 return b, timeutil.Unix(sec, nsec), nil
1236}
1237
1238// DecodeTimeDescending is the descending version of DecodeTimeAscending.
1239func DecodeTimeDescending(b []byte) ([]byte, time.Time, error) {

Callers 1

prettyPrintFirstValueFunction · 0.85

Calls 2

UnixFunction · 0.92
decodeTimeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…