Skip to content
Snippets Groups Projects
Unverified Commit d397104b authored by Jakob Möller's avatar Jakob Möller Committed by GitHub
Browse files

Revert "Update UTC time to LocalTime (#1041) (EXPOSUREAPP-1863)" (#1107)


This reverts commit 2ba3ec0f

This is done as the UTC communication was done falsely by Google and will be corrected in the docs. No action is necessary on our side.

Signed-off-by: default avatard067928 <jakob.moeller@sap.com>
parent 11bebf98
No related branches found
No related tags found
No related merge requests found
...@@ -124,10 +124,10 @@ object RetrieveDiagnosisKeysTransaction : Transaction() { ...@@ -124,10 +124,10 @@ object RetrieveDiagnosisKeysTransaction : Transaction() {
} }
suspend fun startWithConstraints() { suspend fun startWithConstraints() {
val currentDate = DateTime(Instant.now(), DateTimeZone.getDefault()) val currentDate = DateTime(Instant.now(), DateTimeZone.UTC)
val lastFetch = DateTime( val lastFetch = DateTime(
LocalData.lastTimeDiagnosisKeysFromServerFetch(), LocalData.lastTimeDiagnosisKeysFromServerFetch(),
DateTimeZone.getDefault() DateTimeZone.UTC
) )
if (LocalData.lastTimeDiagnosisKeysFromServerFetch() == null || if (LocalData.lastTimeDiagnosisKeysFromServerFetch() == null ||
currentDate.withTimeAtStartOfDay() != lastFetch.withTimeAtStartOfDay() currentDate.withTimeAtStartOfDay() != lastFetch.withTimeAtStartOfDay()
......
...@@ -64,10 +64,10 @@ class TracingViewModel : ViewModel() { ...@@ -64,10 +64,10 @@ class TracingViewModel : ViewModel() {
try { try {
// get the current date and the date the diagnosis keys were fetched the last time // get the current date and the date the diagnosis keys were fetched the last time
val currentDate = DateTime(Instant.now(), DateTimeZone.getDefault()) val currentDate = DateTime(Instant.now(), DateTimeZone.UTC)
val lastFetch = DateTime( val lastFetch = DateTime(
LocalData.lastTimeDiagnosisKeysFromServerFetch(), LocalData.lastTimeDiagnosisKeysFromServerFetch(),
DateTimeZone.getDefault() DateTimeZone.UTC
) )
// check if the keys were not already retrieved today // check if the keys were not already retrieved today
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment