File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ type Options struct {
168168 // underlying Zap logger.
169169 ZapOpts []zap.Option
170170 // TimeEncoder specifies the encoder for the timestamps in log messages.
171- // Defaults to EpochTimeEncoder as this is the default in Zap currently .
171+ // Defaults to RFC3339TimeEncoder .
172172 TimeEncoder zapcore.TimeEncoder
173173}
174174
@@ -217,7 +217,7 @@ func (o *Options) addDefaults() {
217217 }
218218
219219 if o .TimeEncoder == nil {
220- o .TimeEncoder = zapcore .EpochTimeEncoder
220+ o .TimeEncoder = zapcore .RFC3339TimeEncoder
221221 }
222222 f := func (ecfg * zapcore.EncoderConfig ) {
223223 ecfg .EncodeTime = o .TimeEncoder
Original file line number Diff line number Diff line change @@ -502,7 +502,7 @@ var _ = Describe("Zap log level flag options setup", func() {
502502 Expect (optVal .Pointer ()).To (Equal (expVal .Pointer ()))
503503 })
504504
505- It ("Should default to 'epoch ' time encoding" , func () {
505+ It ("Should default to 'rfc3339 ' time encoding" , func () {
506506 args := []string {"" }
507507 fromFlags .BindFlags (& fs )
508508 err := fs .Parse (args )
@@ -513,7 +513,7 @@ var _ = Describe("Zap log level flag options setup", func() {
513513 opt .addDefaults ()
514514
515515 optVal := reflect .ValueOf (opt .TimeEncoder )
516- expVal := reflect .ValueOf (zapcore .EpochTimeEncoder )
516+ expVal := reflect .ValueOf (zapcore .RFC3339TimeEncoder )
517517
518518 Expect (optVal .Pointer ()).To (Equal (expVal .Pointer ()))
519519 })
You can’t perform that action at this time.
0 commit comments