Fix compilation error on iOS
This commit is contained in:
@@ -43,7 +43,7 @@ actual fun parseIsoToEpochMsOrNull(iso: String?): Long? {
|
|||||||
val fmt = NSDateFormatter().apply {
|
val fmt = NSDateFormatter().apply {
|
||||||
dateFormat = "yyyy-MM-dd HH:mm:ss"
|
dateFormat = "yyyy-MM-dd HH:mm:ss"
|
||||||
locale = NSLocale.localeWithLocaleIdentifier("en_US_POSIX")
|
locale = NSLocale.localeWithLocaleIdentifier("en_US_POSIX")
|
||||||
timeZone = NSTimeZone.timeZoneWithAbbreviation("UTC")
|
timeZone = NSTimeZone.timeZoneWithAbbreviation("UTC")!!
|
||||||
}
|
}
|
||||||
val s = iso.replace('T', ' ').removeSuffix("Z")
|
val s = iso.replace('T', ' ').removeSuffix("Z")
|
||||||
val d: NSDate? = fmt.dateFromString(s)
|
val d: NSDate? = fmt.dateFromString(s)
|
||||||
|
|||||||
Reference in New Issue
Block a user