DP-3T / dp3t-sdk-backend

The backend implementation for DP3T
Mozilla Public License 2.0
198 stars 88 forks source link

Use correct clock in test #260

Closed ineiti closed 3 years ago

ineiti commented 3 years ago

Mixing UTC-clock and local clock calculations while setting the clock can end up on the wrong side of the day. This PR uses the same clock for the calculation of noon and as the baseClock.

sonarcloud[bot] commented 3 years ago

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

ineiti commented 3 years ago

Comment from @ubamrein:

you say you want to prevent mixing of different clocks
but with the PR you use systemUTC for UTCInstant.now() and systemDefaultZone for the clock offset
so this introduces a mixing of clocks no?

Which is correct. Back to the drawing-board...

ineiti commented 3 years ago

Closed in favour of #261