MCPcopy
hub / github.com/uber-go/zap / RFC3339TimeEncoder

Function RFC3339TimeEncoder

zapcore/encoder.go:149–151  ·  view source on GitHub ↗

RFC3339TimeEncoder serializes a time.Time to an RFC3339-formatted string. If enc supports AppendTimeLayout(t time.Time,layout string), it's used instead of appending a pre-formatted string value.

(t time.Time, enc PrimitiveArrayEncoder)

Source from the content-addressed store, hash-verified

147// If enc supports AppendTimeLayout(t time.Time,layout string), it's used
148// instead of appending a pre-formatted string value.
149func RFC3339TimeEncoder(t time.Time, enc PrimitiveArrayEncoder) {
150 encodeTimeLayout(t, time.RFC3339, enc)
151}
152
153// RFC3339NanoTimeEncoder serializes a time.Time to an RFC3339-formatted string
154// with nanosecond precision.

Callers

nothing calls this directly

Calls 1

encodeTimeLayoutFunction · 0.85

Tested by

no test coverage detected