EncodeTimeTZAscending encodes a timetz.TimeTZ value and appends it to the supplied buffer and returns the final buffer. The encoding is guaranteed to be ordered such that if t1.Before(t2) then after encodeTimeTZ(b1, t1) and encodeTimeTZ(b2, t2), Compare(b1, b2) < 0. The time zone offset is included
(b []byte, t timetz.TimeTZ)
| 956 | // Compare(b1, b2) < 0. |
| 957 | // The time zone offset is included in the encoding. |
| 958 | func EncodeTimeTZAscending(b []byte, t timetz.TimeTZ) []byte { |
| 959 | // Do not use TimeOfDay's add function, as it loses 24:00:00 encoding. |
| 960 | return encodeTimeTZ(b, int64(t.TimeOfDay)+int64(t.OffsetSecs)*offsetSecsToMicros, t.OffsetSecs) |
| 961 | } |
| 962 | |
| 963 | // EncodeTimeTZDescending is the descending version of EncodeTimeTZAscending. |
| 964 | func EncodeTimeTZDescending(b []byte, t timetz.TimeTZ) []byte { |
nothing calls this directly
no test coverage detected
searching dependent graphs…