diff --git a/src/main/kotlin/org/veupathdb/vdi/lib/json/JSON.kt b/src/main/kotlin/org/veupathdb/vdi/lib/json/JSON.kt index 7d40378..5dbd6b9 100644 --- a/src/main/kotlin/org/veupathdb/vdi/lib/json/JSON.kt +++ b/src/main/kotlin/org/veupathdb/vdi/lib/json/JSON.kt @@ -5,6 +5,8 @@ import com.fasterxml.jackson.datatype.jdk8.Jdk8Module import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule import com.fasterxml.jackson.module.kotlin.KotlinModule import com.fasterxml.jackson.module.paramnames.ParameterNamesModule +import java.text.SimpleDateFormat +import java.util.TimeZone /** * Jackson Object Mapper @@ -20,6 +22,10 @@ val JSON = JsonMapper.builder() .addModule(JavaTimeModule()) .addModule(KotlinModule.Builder().build()) .build()!! + .also { + it.dateFormat = SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX") + it.dateFormat.timeZone = TimeZone.getDefault() + } /** * Writes an arbitrary value as a JSON string.