Solution: Multiplatform LocalDateTime

Kotlin/JVM code:

import java.time.LocalDateTime as JavaLocalDateTime actual typealias LocalDateTime = java.time.LocalDateTime actual fun now(): LocalDateTime = JavaLocalDateTime.now() actual fun parseLocalDateTime(str: String): LocalDateTime = JavaLocalDateTime.parse(str)

Kotlin/JS code:

import kotlin.js.Date actual class LocalDateTime( val date: Date = Date(), ) { actual fun getSecond(): Int = date.getSeconds() actual fun getMinute(): Int = date.getMinutes() actual fun getHour(): Int = date.getHours() actual fun plusSeconds(seconds: Long): LocalDateTime = LocalDateTime(Date(date.getTime() + seconds * 1000)) } actual fun now(): LocalDateTime = LocalDateTime() actual fun parseLocalDateTime(str: String): LocalDateTime = LocalDateTime(Date(Date.parse(str)))