Currently, the time package allows for converting time.Time to nanoseconds. This issue proposes a symmetrical helper that converts nanoseconds to time.Time:
The proposed API follows a similar pattern to the existing helpers: UnixMilli and UnixMicro implemented in 49dccf1:
func UnixNano(nsec int64) Time {
return Unix(nsec/1e9, nsec%1e9)
}