func RFC3339TimeEncoder()

in encoder.go [57:72]


func RFC3339TimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder) {
	type appendTimeEncoder interface {
		AppendTimeLayout(time.Time, string)
	}
	// Use a custom RFC3339 layout with obligatory millisecond
	// precision rather than the second-resolution or optional
	// nano-second resolution that is provided in the time
	// package.
	const rfc3339millis = "2006-01-02T15:04:05.000Z07:00"
	if enc, ok := enc.(appendTimeEncoder); ok {
		enc.AppendTimeLayout(t, rfc3339millis)
		return
	}

	enc.AppendString(t.Format(rfc3339millis))
}