From 93246cada7f97de4275c226e8c157e61eab2ce3c Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Mon, 29 Mar 2021 22:29:10 +0600 Subject: [PATCH] fix of next with DateTimeTz --- src/commonMain/kotlin/dev/inmo/krontab/KronScheduler.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commonMain/kotlin/dev/inmo/krontab/KronScheduler.kt b/src/commonMain/kotlin/dev/inmo/krontab/KronScheduler.kt index 53af1c5..dcd2eef 100644 --- a/src/commonMain/kotlin/dev/inmo/krontab/KronScheduler.kt +++ b/src/commonMain/kotlin/dev/inmo/krontab/KronScheduler.kt @@ -22,7 +22,7 @@ interface KronScheduler { suspend fun next(relatively: DateTime = DateTime.now()): DateTime? suspend fun next(relatively: DateTimeTz): DateTimeTz? { - return next(relatively.utc) ?.toOffset(relatively.offset) + return next(relatively.local) ?.toOffsetUnadjusted(relatively.offset) } }