From e22896a9569b3dc8d8bc087a4765f8de2391a69b Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 19 Nov 2022 22:40:17 -0500 Subject: [PATCH] Use current timezone when setting tracker dates Fixes #8553 --- .../eu/kanade/tachiyomi/ui/manga/track/TrackInfoDialog.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackInfoDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackInfoDialog.kt index 299bcd1eb..be6249c6c 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackInfoDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackInfoDialog.kt @@ -8,7 +8,6 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Delete -import androidx.compose.material.icons.outlined.Delete import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.FilledTonalButton import androidx.compose.material3.Icon @@ -79,7 +78,6 @@ import uy.kohesive.injekt.api.get import java.time.Instant import java.time.LocalDate import java.time.ZoneId -import java.time.ZoneOffset data class TrackInfoDialogHomeScreen( private val mangaId: Long, @@ -462,8 +460,8 @@ private data class TrackDateSelectorScreen( fun setDate() { coroutineScope.launchNonCancellable { - val millis = state.value.selection.atStartOfDay() - .toInstant(ZoneOffset.UTC) + val millis = state.value.selection.atStartOfDay(ZoneId.systemDefault()) + .toInstant() .toEpochMilli() if (start) { service.setRemoteStartDate(track, millis)