Skip to content

Commit 28bd0fe

Browse files
[Bug] Tasks marked overdue when due tomorrow #1440 another attempt
1 parent d639f09 commit 28bd0fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/src/main/java/at/techbee/jtx/database/ICalObject.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ data class ICalObject(
699699
if(due == null)
700700
return null
701701

702-
val localNow = ZonedDateTime.now()
702+
val localNow = ZonedDateTime.now(requireTzId(dueTimezone))
703703
val localDue = ZonedDateTime.ofInstant(Instant.ofEpochMilli(due), ZoneId.of("UTC")).withZoneSameInstant(requireTzId(dueTimezone))
704704

705705
return ChronoUnit.MINUTES.between(localNow, localDue) < 0L
@@ -786,7 +786,7 @@ data class ICalObject(
786786
else
787787
null
788788

789-
val localNow = ZonedDateTime.now()
789+
val localNow = ZonedDateTime.now(requireTzId(timezone2show))
790790
val localTomorrow = localNow.plusDays(1)
791791
val localDue = ZonedDateTime.ofInstant(Instant.ofEpochMilli(due), ZoneId.of("UTC")).withZoneSameInstant(requireTzId(timezone2show))
792792

0 commit comments

Comments
 (0)