unixFloat converts a time.Time to a float64 unix timestamp with microsecond precision (matching the internal event.Event.Timestamp representation).
(t time.Time)
| 329 | // unixFloat converts a time.Time to a float64 unix timestamp with microsecond |
| 330 | // precision (matching the internal event.Event.Timestamp representation). |
| 331 | func 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. |