MCPcopy Create free account
hub / github.com/buggregator/server / unixFloat

Function unixFloat

modules/smtp/api.go:331–333  ·  view source on GitHub ↗

unixFloat converts a time.Time to a float64 unix timestamp with microsecond precision (matching the internal event.Event.Timestamp representation).

(t time.Time)

Source from the content-addressed store, hash-verified

329// unixFloat converts a time.Time to a float64 unix timestamp with microsecond
330// precision (matching the internal event.Event.Timestamp representation).
331func unixFloat(t time.Time) float64 {
332 return float64(t.UnixMicro()) / 1_000_000
333}
334
335// parseTimestamp parses a timestamp from an RFC3339 string, unix-ms integer, or
336// plain float (unix seconds). Returns 0 on failure.

Callers 1

parseTimestampFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected