Closed vduhautois closed 2 years ago
this test is broken when I run it locally : testsShouldHaveStartAndFinishTimestamps
We have this code:
String fakeTimestamp = "2021-03-24T12:01:02.456"; LocalDateTime now = LocalDateTime.parse(fakeTimestamp); ZoneId zone = ZoneId.systemDefault(); Clock clock = Clock.fixed(ZonedDateTime.of(now, zone).toInstant(), zone);
When I run it, I have this failure: Expected :"2021-03-24T12:01:02.456" Actual :"2021-03-24T11:01:02.456"
I would have change the ZoneId to:
ZoneId.of("UTC");
As there is no timezone involved when working in UTC, there is no chance of failure because of it.
Thanks for reporting and for the suggestion, will have a look at it ASAP
this test is broken when I run it locally : testsShouldHaveStartAndFinishTimestamps
We have this code:
When I run it, I have this failure: Expected :"2021-03-24T12:01:02.456" Actual :"2021-03-24T11:01:02.456"
I would have change the ZoneId to:
As there is no timezone involved when working in UTC, there is no chance of failure because of it.