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

Function Unix

pkg/util/timeutil/time.go:120–122  ·  view source on GitHub ↗

Unix wraps time.Unix ensuring that the result is in UTC instead of Local. The process of deriving the args to construct a specific time.Time: // say we want to construct timestamp "294277-01-01 23:59:59.999999 +0000 UTC" tm := time.Date(294277, 1, 1, 23, 59, 59, 999999000, time.UTC) // get the

(sec, nsec int64)

Source from the content-addressed store, hash-verified

118// // verify
119// fmt.Println(tm == time.Unix(sec, nsec).UTC())
120func Unix(sec, nsec int64) time.Time {
121 return time.Unix(sec, nsec).UTC()
122}
123
124// ReplaceLibPQTimePrefix replaces unparsable lib/pq dates used for timestamps
125// (0000-01-01) with timestamps that can be parsed by date libraries.

Callers 12

datum.goFile · 0.92
SampleDatumFunction · 0.92
DecodeTimeAscendingFunction · 0.92
DecodeTimeDescendingFunction · 0.92
DecodeUntaggedTimeValueFunction · 0.92
ToTimeMethod · 0.92
parsing.goFile · 0.92
TimeMethod · 0.92
GoTimeMethod · 0.92
NowMethod · 0.92
ToTimeMethod · 0.92
ToDurationMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…