Skip to content

Commit cdf4387

Browse files
committed
Use time constant layout when parsing logs
1 parent 2d753a4 commit cdf4387

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/suite/reconfig_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,12 +231,11 @@ var _ = Describe("Reconfiguration Performance Testing", Ordered, Label("reconfig
231231
}
232232

233233
calculateTimeDifferenceBetweenLogLines := func(firstLine, secondLine string) (int, error) {
234+
layout := time.RFC3339
235+
234236
firstTS := getTimeStampFromLogLine(firstLine)
235237
secondTS := getTimeStampFromLogLine(secondLine)
236238

237-
// i might be able to just use the local constant timestamp layout
238-
layout := "2006-01-02T15:04:05Z"
239-
240239
parsedTS1, err := time.Parse(layout, firstTS)
241240
if err != nil {
242241
return 0, err

0 commit comments

Comments
 (0)