@Test public void toDate() { ZonedDateTime now = ZonedDateTime.now(); Date date = converter.toDate(now); assertNotNull(date); assertEquals(date.getTime(), now.toInstant().toEpochMilli()); }
@AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.DATE_TIME, concerns = AtlasConversionConcern.TIMEZONE) public Date toDate(ZonedDateTime value) { return value != null ? Date.from(value.toInstant()) : null; }
ZonedDateTimeConverter implements AtlasConverter<ZonedDateTime> { @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.DATE_TIME, concerns = AtlasConversionConcern.TIMEZONE) public Date toDate(ZonedDateTime value) { return value != null ? Date.from(value.toInstant()) : null; } }
ZonedDateTimeConverter implements AtlasConverter<ZonedDateTime> { @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.DATE_TIME, concerns = AtlasConversionConcern.TIMEZONE) public Date toDate(ZonedDateTime value) { return value != null ? Date.from(value.toInstant()) : null; }  }
ZonedDateTimeConverter implements AtlasConverter<ZonedDateTime> { @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.DATE_TIME, concerns = AtlasConversionConcern.TIMEZONE) public Date toDate(ZonedDateTime value) { return value != null ? Date.from(value.toInstant()) : null; }  @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.DECIMAL, concerns = AtlasConversionConcern.TIMEZONE) BigDecimal toBigDecimal(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.BIG_INTEGER, concerns = AtlasConversionConcern.TIMEZONE) BigInteger toBigInteger(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.BYTE, concerns = {AtlasConversionConcern.RANGE, AtlasConversionConcern.TIMEZONE}) Byte toByte(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.DATE_TIME_TZ) Calendar toCalendar(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.DATE_TIME, concerns = AtlasConversionConcern.TIMEZONE) Date toDate(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.DOUBLE, concerns = AtlasConversionConcern.TIMEZONE) Double toDouble(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.FLOAT, concerns = AtlasConversionConcern.TIMEZONE) Float toFloat(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.DATE_TIME_TZ) GregorianCalendar toGregorianCalendar(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.INTEGER, concerns = {AtlasConversionConcern.RANGE, AtlasConversionConcern.TIMEZONE}) Integer toInteger(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.DATE) LocalDate toLocalDate(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.DATE_TIME) LocalDateTime toLocalDateTime(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.TIME) LocalTime toLocalTime(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.LONG, concerns = AtlasConversionConcern.TIMEZONE) Long toLong(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.SHORT, concerns = {AtlasConversionConcern.RANGE, AtlasConversionConcern.TIMEZONE}) Short toShort(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.STRING) String toString(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.NUMBER, concerns = AtlasConversionConcern.TIMEZONE) Number toNumber(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.DATE) java.sql.Date toSqlDate(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.TIME) java.sql.Time toSqlTime(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.DATE_TIME) java.sql.Timestamp toSqlTimestamp(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.DATE_TIME_TZ) ZonedDateTime toZonedDateTime(ZonedDateTime value); }
ZonedDateTimeConverter implements AtlasConverter<ZonedDateTime> { @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.DATE_TIME, concerns = AtlasConversionConcern.TIMEZONE) public Date toDate(ZonedDateTime value) { return value != null ? Date.from(value.toInstant()) : null; }  @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.DECIMAL, concerns = AtlasConversionConcern.TIMEZONE) BigDecimal toBigDecimal(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.BIG_INTEGER, concerns = AtlasConversionConcern.TIMEZONE) BigInteger toBigInteger(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.BYTE, concerns = {AtlasConversionConcern.RANGE, AtlasConversionConcern.TIMEZONE}) Byte toByte(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.DATE_TIME_TZ) Calendar toCalendar(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.DATE_TIME, concerns = AtlasConversionConcern.TIMEZONE) Date toDate(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.DOUBLE, concerns = AtlasConversionConcern.TIMEZONE) Double toDouble(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.FLOAT, concerns = AtlasConversionConcern.TIMEZONE) Float toFloat(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.DATE_TIME_TZ) GregorianCalendar toGregorianCalendar(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.INTEGER, concerns = {AtlasConversionConcern.RANGE, AtlasConversionConcern.TIMEZONE}) Integer toInteger(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.DATE) LocalDate toLocalDate(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.DATE_TIME) LocalDateTime toLocalDateTime(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.TIME) LocalTime toLocalTime(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.LONG, concerns = AtlasConversionConcern.TIMEZONE) Long toLong(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.SHORT, concerns = {AtlasConversionConcern.RANGE, AtlasConversionConcern.TIMEZONE}) Short toShort(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.STRING) String toString(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.NUMBER, concerns = AtlasConversionConcern.TIMEZONE) Number toNumber(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.DATE) java.sql.Date toSqlDate(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.TIME) java.sql.Time toSqlTime(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.DATE_TIME) java.sql.Timestamp toSqlTimestamp(ZonedDateTime value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.DATE_TIME_TZ) ZonedDateTime toZonedDateTime(ZonedDateTime value);  }