Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Fix QR code timezone (EXPOSUREAPP-6249) #2786

Merged
merged 5 commits into from
Apr 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import de.rki.coronawarnapp.util.ui.popBackStack
import de.rki.coronawarnapp.util.ui.viewBindingLazy
import de.rki.coronawarnapp.util.viewmodel.CWAViewModelFactoryProvider
import de.rki.coronawarnapp.util.viewmodel.cwaViewModelsAssisted
import org.joda.time.DateTimeZone
import org.joda.time.Duration
import org.joda.time.LocalDate
import org.joda.time.LocalDateTime
Expand Down Expand Up @@ -160,14 +159,14 @@ class TraceLocationCreateFragment : Fragment(R.layout.trace_location_create_frag
MaterialDatePicker
.Builder
.datePicker()
.setSelection(defaultValue?.toDateTime(DateTimeZone.UTC)?.millis)
.setSelection(defaultValue?.toDateTime()?.millis)
.apply {
if (minConstraint != null) {
setCalendarConstraints(
CalendarConstraints.Builder()
.setValidator(
DateValidatorPointForward
.from(minConstraint.withMillisOfDay(0).toDateTime(DateTimeZone.UTC).millis)
.from(minConstraint.withMillisOfDay(0).toDateTime().millis)
)
.build()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import de.rki.coronawarnapp.util.coroutine.DispatcherProvider
import de.rki.coronawarnapp.util.ui.SingleLiveEvent
import de.rki.coronawarnapp.util.viewmodel.CWAViewModel
import de.rki.coronawarnapp.util.viewmodel.CWAViewModelFactory
import org.joda.time.DateTimeZone
import org.joda.time.Duration
import org.joda.time.LocalDateTime
import timber.log.Timber
Expand Down Expand Up @@ -64,8 +63,8 @@ class TraceLocationCreateViewModel @AssistedInject constructor(
type = category.type,
description = description,
address = address,
startDate = begin?.toDateTime(DateTimeZone.UTC)?.toInstant(),
endDate = end?.toDateTime(DateTimeZone.UTC)?.toInstant(),
startDate = begin?.toDateTime()?.toInstant(),
endDate = end?.toDateTime()?.toInstant(),
defaultCheckInLengthInMinutes = checkInLength.standardMinutes.toInt()
)

Expand Down