Fixed instantiating Date with current time

This commit is contained in:
dankito 2020-07-12 01:49:05 +02:00
parent 83880c7b24
commit cc72d9792e
1 changed files with 1 additions and 1 deletions

View File

@ -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