@Test public void checkConvertToDatabaseColumnReturnConvertedOnNonNull() { final ZonedDateTime time = ZonedDateTime .of(LocalDateTime.of(2020, 10, 20, 6, 23, 10), ZoneId.of(ZoneId.SHORT_IDS.get("ECT"))); final OffsetDateTime act = cut.convertToDatabaseColumn(time); assertEquals("2020-10-20T06:23:10+02:00", act.toString()); }
@Override public OffsetDateTime convertToDatabaseColumn(final ZonedDateTime zonedDateTime) { return zonedDateTime == null ? null : zonedDateTime.toOffsetDateTime(); }
OffsetDateTimeConverter implements AttributeConverter<ZonedDateTime, OffsetDateTime> { @Override public OffsetDateTime convertToDatabaseColumn(final ZonedDateTime zonedDateTime) { return zonedDateTime == null ? null : zonedDateTime.toOffsetDateTime(); } }
OffsetDateTimeConverter implements AttributeConverter<ZonedDateTime, OffsetDateTime> { @Override public OffsetDateTime convertToDatabaseColumn(final ZonedDateTime zonedDateTime) { return zonedDateTime == null ? null : zonedDateTime.toOffsetDateTime(); }  }
OffsetDateTimeConverter implements AttributeConverter<ZonedDateTime, OffsetDateTime> { @Override public OffsetDateTime convertToDatabaseColumn(final ZonedDateTime zonedDateTime) { return zonedDateTime == null ? null : zonedDateTime.toOffsetDateTime(); }  @Override OffsetDateTime convertToDatabaseColumn(final ZonedDateTime zonedDateTime); @Override ZonedDateTime convertToEntityAttribute(final OffsetDateTime dateTimeWithOffset); }
OffsetDateTimeConverter implements AttributeConverter<ZonedDateTime, OffsetDateTime> { @Override public OffsetDateTime convertToDatabaseColumn(final ZonedDateTime zonedDateTime) { return zonedDateTime == null ? null : zonedDateTime.toOffsetDateTime(); }  @Override OffsetDateTime convertToDatabaseColumn(final ZonedDateTime zonedDateTime); @Override ZonedDateTime convertToEntityAttribute(final OffsetDateTime dateTimeWithOffset);  }