You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
zapcore package has implemented 4 types of TimeEncoder (Epoch, EpochMillis, EpochNanos, and ISO8601). Is it possible to add RFC3339 and RFC3339Nano or any other standard format in go's time package. I've seen this implemented in #276 , but I couldn't find it anymore in the current version.
Another solution is to implement a custom TimeEncoder ourself
zapcore package has implemented 4 types of TimeEncoder (Epoch, EpochMillis, EpochNanos, and ISO8601). Is it possible to add RFC3339 and RFC3339Nano or any other standard format in go's time package. I've seen this implemented in #276 , but I couldn't find it anymore in the current version.
Another solution is to implement a custom TimeEncoder ourself
func rfc3339TimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder) { enc.AppendString(t.Format(time.RFC3339Nano)) }
but I'm not sure if it will cause any further issues as TimeEncoder.UnmarshalText does not support custom one.
The text was updated successfully, but these errors were encountered: