mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
FIX: conversion errors discovered by test
This commit is contained in:
+1
-1
@@ -22,7 +22,7 @@ final class ScalarTypeJodaDateMidnight extends ScalarTypeBaseDate<org.joda.time.
|
||||
|
||||
@Override
|
||||
protected String toIsoFormat(DateMidnight value) {
|
||||
return value.toString();
|
||||
return value.toLocalDate().toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -26,6 +26,11 @@ final class ScalarTypeJodaLocalDateTime extends ScalarTypeBaseDateTime<LocalDate
|
||||
protected String toJsonISO8601(LocalDateTime value) {
|
||||
return value.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected LocalDateTime fromJsonISO8601(String value) {
|
||||
return LocalDateTime.parse(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long convertToMillis(LocalDateTime value) {
|
||||
|
||||
@@ -8,8 +8,6 @@ import java.time.Instant;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.time.ZoneId;
|
||||
|
||||
import static io.ebeaninternal.server.type.IsoJsonDateTimeParser.formatIso;
|
||||
|
||||
/**
|
||||
* ScalarType for java.sql.Timestamp.
|
||||
*/
|
||||
@@ -29,7 +27,7 @@ final class ScalarTypeOffsetDateTime extends ScalarTypeBaseDateTime<OffsetDateTi
|
||||
|
||||
@Override
|
||||
protected String toJsonISO8601(OffsetDateTime value) {
|
||||
return formatIso(value.toInstant());
|
||||
return value.toInstant().toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -28,7 +28,7 @@ final class ScalarTypeTimestamp extends ScalarTypeBaseDateTime<Timestamp> {
|
||||
|
||||
@Override
|
||||
protected String toJsonISO8601(Timestamp value) {
|
||||
return formatIso(value.toInstant());
|
||||
return value.toInstant().toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user