Skip to content

Commit 8913b43

Browse files
authored
Revert "Set LocalDateTime as Default Java Type for TIMESTAMP/DATETIME" (#152)
This reverts commit 15b12b1. Motivation: The previous comit introduced a breaking change without prior notice and minor version change. Modification: Reverts commit 15b12b1 Result: Resolves #151
1 parent 69876ae commit 8913b43

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/io/asyncer/r2dbc/mysql/constant/MySqlType.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
import java.math.BigInteger;
2424
import java.nio.ByteBuffer;
2525
import java.time.LocalDate;
26-
import java.time.LocalDateTime;
2726
import java.time.LocalTime;
27+
import java.time.ZonedDateTime;
2828

2929
/**
3030
* Enumeration of MySQL data types.
@@ -196,7 +196,7 @@ public int getBinarySize() {
196196
* A timestamp type, it will automatically synchronize with the server timezone. It still uses string
197197
* format to transfer the timestamp value.
198198
*/
199-
TIMESTAMP(MySqlType.ID_TIMESTAMP, LocalDateTime.class),
199+
TIMESTAMP(MySqlType.ID_TIMESTAMP, ZonedDateTime.class),
200200

201201
/**
202202
* A signed 64-bits integer type.
@@ -271,7 +271,7 @@ public int getBinarySize() {
271271
/**
272272
* A date time type. It does not contain timezone. It uses string format to transfer the value.
273273
*/
274-
DATETIME(MySqlType.ID_DATETIME, LocalDateTime.class),
274+
DATETIME(MySqlType.ID_DATETIME, ZonedDateTime.class),
275275

276276
/**
277277
* A year type. It contains neither leap year information nor timezone.

0 commit comments

Comments
 (0)