From 098c5de1a533c6f3643c5f41d5bee4c9aac4b37e Mon Sep 17 00:00:00 2001 From: Leng Sheng Hong Date: Sun, 31 May 2020 02:03:36 +0800 Subject: [PATCH 1/4] convert java.util.date object when using hikari to LocalDate for Type.DATE --- src/main/kotlin/io/zeko/model/Entity.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/io/zeko/model/Entity.kt b/src/main/kotlin/io/zeko/model/Entity.kt index 1407942..cb5c589 100644 --- a/src/main/kotlin/io/zeko/model/Entity.kt +++ b/src/main/kotlin/io/zeko/model/Entity.kt @@ -96,11 +96,15 @@ abstract class Entity { //Vertx JDBC client returns date time field as String and already converted to UTC val pattern = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssXXX") val systemZoneDateTime = ZonedDateTime.parse(value, pattern).withZoneSameInstant(ZoneId.systemDefault()) - return systemZoneDateTime.toLocalDateTime() + systemZoneDateTime.toLocalDateTime() } } Type.DATE -> { - LocalDate.parse(value.toString()) + if (value is java.util.Date) { + value.toInstant().atZone(ZoneId.systemDefault()).toLocalDate() + } else { + LocalDate.parse(value.toString()) + } } Type.ZONEDATETIME_UTC -> { if (value !is String) { From 388a8272811b841903799ecdbc35b3fbbcee2e97 Mon Sep 17 00:00:00 2001 From: Leng Sheng Hong Date: Sun, 31 May 2020 02:07:47 +0800 Subject: [PATCH 2/4] [maven-release-plugin] prepare release 1.1.8 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 1692689..6419aff 100755 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ io.zeko zeko-sql-builder - 1.1.8-SNAPSHOT + 1.1.8 jar ${project.groupId}:${project.artifactId} @@ -40,7 +40,7 @@ scm:git:https://github.com/darkredz/Zeko-SQL-Builder.git scm:git:ssh://github.com/darkredz/Zeko-SQL-Builder.git https://github.com/darkredz/Zeko-SQL-Builder - HEAD + 1.1.8 From 1368267ff50819760fb74afddd1af12fe97e3324 Mon Sep 17 00:00:00 2001 From: Leng Sheng Hong Date: Sun, 31 May 2020 02:07:47 +0800 Subject: [PATCH 3/4] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 6419aff..9f845f9 100755 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ io.zeko zeko-sql-builder - 1.1.8 + 1.1.9-SNAPSHOT jar ${project.groupId}:${project.artifactId} @@ -40,7 +40,7 @@ scm:git:https://github.com/darkredz/Zeko-SQL-Builder.git scm:git:ssh://github.com/darkredz/Zeko-SQL-Builder.git https://github.com/darkredz/Zeko-SQL-Builder - 1.1.8 + HEAD From e2e525c2b162259d9026558af5d1c9174a3c73f2 Mon Sep 17 00:00:00 2001 From: Leng Sheng Hong Date: Sun, 31 May 2020 02:20:06 +0800 Subject: [PATCH 4/4] update version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8fde9c6..81a2ea5 100644 --- a/README.md +++ b/README.md @@ -752,7 +752,7 @@ Add this to your maven pom.xml io.zeko zeko-sql-builder - 1.1.7 + 1.1.8