-
Notifications
You must be signed in to change notification settings - Fork 495
Submit analytics date conversion (EXPOSUREAPP-12616) #5159
Conversation
@@ -74,7 +75,7 @@ class ExposureRiskMetadataDonor @Inject constructor( | |||
val riskLevelPtForMetadata = lastPTRiskResult.toMetadataRiskLevel() | |||
val mostRecentDateAtPtRiskLevel = lastPTRiskResult | |||
.mostRecentDateAtRiskState | |||
?.toDateTimeAtStartOfDay() | |||
?.toDateTimeAtStartOfDay(DateTimeZone.UTC) | |||
?.toInstant() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a unit test for that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, unit test added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the test. Can you add one for the donor to make sure this is and stays fixed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed present tests to use toDateTimeAtStartOfDayUtc
Kudos, SonarCloud Quality Gate passed! |
Using the device Timezone for toDateTimeAtStartOfDay results in a date two hours before midnight the day before.
Using UTC Timezone results in midnight of the same day