Skip to content
Snippets Groups Projects
Unverified Commit 56de0a26 authored by Kamil Bobrowski's avatar Kamil Bobrowski Committed by GitHub
Browse files

changed time zones to UTC (#818)

parent 05ff226e
No related branches found
No related tags found
No related merge requests found
...@@ -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
......
...@@ -35,10 +35,10 @@ class DiagnosisKeyRetrievalOneTimeWorker(val context: Context, workerParams: Wor ...@@ -35,10 +35,10 @@ class DiagnosisKeyRetrievalOneTimeWorker(val context: Context, workerParams: Wor
var result = Result.success() var result = Result.success()
try { try {
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()
......
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