Skip to content

Commit

Permalink
Merge pull request #29 from darkredz/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
darkredz authored May 30, 2020
2 parents 1057e3a + e2e525c commit 921f227
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ Add this to your maven pom.xml
<dependency>
<groupId>io.zeko</groupId>
<artifactId>zeko-sql-builder</artifactId>
<version>1.1.7</version>
<version>1.1.8</version>
</dependency>

<!-- Jasync Mysql driver if needed -->
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>io.zeko</groupId>
<artifactId>zeko-sql-builder</artifactId>
<version>1.1.8-SNAPSHOT</version>
<version>1.1.9-SNAPSHOT</version>
<packaging>jar</packaging>

<name>${project.groupId}:${project.artifactId}</name>
Expand Down
8 changes: 6 additions & 2 deletions src/main/kotlin/io/zeko/model/Entity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 921f227

Please sign in to comment.