From cc72d9792e25c12ecb2489c96f37ac8535570cc8 Mon Sep 17 00:00:00 2001 From: dankito Date: Sun, 12 Jul 2020 01:49:05 +0200 Subject: [PATCH] Fixed instantiating Date with current time --- .../src/iosMain/kotlin/net/dankito/utils/multiplatform/Date.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/iosMain/kotlin/net/dankito/utils/multiplatform/Date.kt b/common/src/iosMain/kotlin/net/dankito/utils/multiplatform/Date.kt index e74201a3..dfb6ffea 100644 --- a/common/src/iosMain/kotlin/net/dankito/utils/multiplatform/Date.kt +++ b/common/src/iosMain/kotlin/net/dankito/utils/multiplatform/Date.kt @@ -17,7 +17,7 @@ actual class Date(val date: NSDate) { // cannot subclass NSDate as it's a class actual constructor(millisSinceEpoch: Long) : this(NSDate(timeIntervalSinceReferenceDate = ((millisSinceEpoch - DiffBetweenEpochTimeAndReferenceDate) / 1000).toDouble())) - actual constructor() : this(NSDate().timeIntervalSince1970.toMillis()) + actual constructor() : this(NSDate()) actual val millisSinceEpoch: Long