Skip to content

Commit 188b486

Browse files
authored
Merge pull request #1856 from JohnStrunk/fix-zap-test
🐛 zap-time-encoding test should allow negative tz offset
2 parents 8996162 + 3847eeb commit 188b486

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/log/zap/zap_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ var _ = Describe("Zap log level flag options setup", func() {
528528

529529
It("Should propagate time encoder to logger", func() {
530530
// zaps ISO8601TimeEncoder uses 2006-01-02T15:04:05.000Z0700 as pattern for iso8601 encoding
531-
iso8601Pattern := `^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}(\+[0-9]{4}|Z)`
531+
iso8601Pattern := `^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}([-+][0-9]{4}|Z)`
532532

533533
args := []string{"--zap-time-encoding=iso8601"}
534534
fromFlags.BindFlags(&fs)

0 commit comments

Comments
 (0)