diff options
Diffstat (limited to 'kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft')
-rw-r--r-- | kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/RemoteAgent.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/RemoteAgent.kt b/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/RemoteAgent.kt index 06e150e4..1fb90507 100644 --- a/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/RemoteAgent.kt +++ b/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/RemoteAgent.kt @@ -35,6 +35,7 @@ import kotlinx.serialization.internal.StringSerializer import kotlinx.serialization.list import kotlinx.serialization.serializer import pl.treksoft.kvision.types.JsonDateSerializer +import pl.treksoft.kvision.types.toStringInternal import kotlin.js.Date import kotlin.reflect.KClass @@ -113,7 +114,7 @@ interface RemoteAgent { is Enum<*> -> "\"$value\"" is String -> value is Char -> "\"$value\"" - is Date -> "\"${value.getTime()}\"" + is Date -> "\"${value.toStringInternal()}\"" else -> try { @Suppress("UNCHECKED_CAST") JSON.plain.stringify(kClass.serializer(), value) |