MCPcopy
hub / github.com/google/mangle / FormatTime

Function FormatTime

ast/ast.go:97–100  ·  view source on GitHub ↗

FormatTime formats a time instant (nanoseconds since Unix epoch) as an ISO 8601 string.

(nanos int64)

Source from the content-addressed store, hash-verified

95
96// FormatTime formats a time instant (nanoseconds since Unix epoch) as an ISO 8601 string.
97func FormatTime(nanos int64) string {
98 t := time.Unix(0, nanos).UTC()
99 return t.Format(time.RFC3339Nano)
100}
101
102// FormatDuration formats a duration (nanoseconds) as a human-readable string.
103// Uses the most appropriate unit: ns, us, ms, s, m, h, or combinations.

Callers 2

StringMethod · 0.85
DisplayStringMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected