From 07f9472afaffb3d6187d15eb13368f3b8f3b1b7b Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Sat, 19 Jan 2019 01:04:34 +0100 Subject: Add timezone info to the JSON date format. --- .../src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt | 4 ++-- .../src/main/kotlin/pl/treksoft/kvision/types/Date.kt | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'kvision-modules/kvision-server-spring-boot/src/main/kotlin') diff --git a/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt b/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt index 8513c128..6e8ee86e 100644 --- a/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt +++ b/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt @@ -28,7 +28,7 @@ import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.launch import org.slf4j.Logger import org.slf4j.LoggerFactory -import pl.treksoft.kvision.types.KV_DATE_FORMAT +import pl.treksoft.kvision.types.KV_JSON_DATE_FORMAT import java.text.SimpleDateFormat import javax.servlet.http.HttpServletRequest import javax.servlet.http.HttpServletResponse @@ -50,7 +50,7 @@ actual open class KVServiceManager actual constructor(val serviceClass: val optionsRequests: MutableMap Unit> = mutableMapOf() val mapper = jacksonObjectMapper().apply { - dateFormat = SimpleDateFormat(KV_DATE_FORMAT) + dateFormat = SimpleDateFormat(KV_JSON_DATE_FORMAT) } var counter: Int = 0 diff --git a/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/types/Date.kt b/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/types/Date.kt index 8ce8cbd4..57853c8b 100644 --- a/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/types/Date.kt +++ b/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/types/Date.kt @@ -29,7 +29,9 @@ import com.github.andrewoma.kwery.mapper.util.camelToLowerUnderscore import java.sql.Timestamp import java.text.SimpleDateFormat -actual val KV_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss" +actual val KV_DEFAULT_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss" + +actual val KV_JSON_DATE_FORMAT = "yyyy-MM-dd HH:mm:ssZ" actual typealias Date = java.util.Date -- cgit