EpochTimeEncoder serializes a time.Time to a floating-point number of seconds since the Unix epoch.
(t time.Time, enc PrimitiveArrayEncoder)
| 101 | // EpochTimeEncoder serializes a time.Time to a floating-point number of seconds |
| 102 | // since the Unix epoch. |
| 103 | func EpochTimeEncoder(t time.Time, enc PrimitiveArrayEncoder) { |
| 104 | nanos := t.UnixNano() |
| 105 | sec := float64(nanos) / float64(time.Second) |
| 106 | enc.AppendFloat64(sec) |
| 107 | } |
| 108 | |
| 109 | // EpochMillisTimeEncoder serializes a time.Time to a floating-point number of |
| 110 | // milliseconds since the Unix epoch. |
nothing calls this directly
no test coverage detected