Skip to content

Commit

Permalink
Merge pull request #32 from darkredz/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
darkredz authored Dec 23, 2020
2 parents be91689 + 1c5ba44 commit ab1fc1b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -752,20 +752,20 @@ Add this to your maven pom.xml
<dependency>
<groupId>io.zeko</groupId>
<artifactId>zeko-sql-builder</artifactId>
<version>1.2.1</version>
<version>1.2.2</version>
</dependency>

<!-- Jasync Mysql driver if needed -->
<dependency>
<groupId>com.github.jasync-sql</groupId>
<artifactId>jasync-mysql</artifactId>
<version>1.1.3</version>
<version>1.1.5</version>
</dependency>
<!-- Hikari Mysql connection pool if needed -->
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>3.4.3</version>
<version>3.4.5</version>
</dependency>
<!-- Vertx jdbc client if needed -->
<dependency>
Expand Down
21 changes: 13 additions & 8 deletions 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.2.1-SNAPSHOT</version>
<version>1.2.3-SNAPSHOT</version>
<packaging>jar</packaging>

<name>${project.groupId}:${project.artifactId}</name>
Expand Down Expand Up @@ -79,8 +79,8 @@
</pluginRepositories>

<properties>
<kotlin.version>1.3.61</kotlin.version>
<vertx.version>3.9.2</vertx.version>
<kotlin.version>1.4.10</kotlin.version>
<vertx.version>4.0.0</vertx.version>
<spek.version>2.0.9</spek.version>
<jupiter.version>5.2.0</jupiter.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -140,28 +140,33 @@
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-sql-common</artifactId>
<artifactId>vertx-jdbc-client</artifactId>
<version>${vertx.version}</version>
</dependency>
<dependency>
<groupId>com.github.jasync-sql</groupId>
<artifactId>jasync-postgresql</artifactId>
<version>1.1.3</version>
<version>1.1.5</version>
</dependency>
<dependency>
<groupId>com.github.jasync-sql</groupId>
<artifactId>jasync-mysql</artifactId>
<version>1.1.3</version>
<version>1.1.5</version>
</dependency>
<dependency>
<groupId>io.zeko</groupId>
<artifactId>zeko-data-mapper</artifactId>
<version>1.6.1</version>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.10.3</version>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>3.4.3</version>
<version>3.4.5</version>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
Expand Down
6 changes: 3 additions & 3 deletions src/main/kotlin/io/zeko/model/Entity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ abstract class Entity {
LocalDateTime.parse(dateStr, pattern)
} else {
//Vertx JDBC client returns date time field as String and already converted to UTC
val pattern = if (value.indexOf("Z") === value.length - 1 && value.indexOf(".") === value.length - 5) {
val pattern = if (value.indexOf("Z") == value.length - 1 && value.indexOf(".") == value.length - 5) {
DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSz")
} else {
DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssXXX")
Expand Down Expand Up @@ -130,7 +130,7 @@ abstract class Entity {
ZonedDateTime.parse(dateStr.removeSuffix("Z") + "Z", pattern)
} else {
//Vertx JDBC client returns date time field as String and already converted to UTC
val pattern = if (value.indexOf("Z") === value.length - 1 && value.indexOf(".") === value.length - 5) {
val pattern = if (value.indexOf("Z") == value.length - 1 && value.indexOf(".") == value.length - 5) {
DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSz")
} else {
DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssXXX")
Expand All @@ -152,7 +152,7 @@ abstract class Entity {
LocalDateTime.parse(dateStr, pattern).atZone(ZoneOffset.UTC).toInstant()
} else {
//Vertx JDBC client returns date time field as String and already converted to UTC
val pattern = if (value.indexOf("Z") === value.length - 1 && value.indexOf(".") === value.length - 5) {
val pattern = if (value.indexOf("Z") == value.length - 1 && value.indexOf(".") == value.length - 5) {
DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSz")
} else {
DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssXXX")
Expand Down

0 comments on commit ab1fc1b

Please sign in to comment.