@Test public void convertToZonedDateTimeWithZoneId() { ZonedDateTime zonedDateTime = DateTimeHelper.toZonedDateTime(new Date(), "America/New_York"); assertNotNull(zonedDateTime); assertThat(zonedDateTime, instanceOf(ZonedDateTime.class)); assertTrue(zonedDateTime.getZone().getId().equals("America/New_York")); }
@AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE_TIME_TZ) public ZonedDateTime toZonedDateTime(Date date) { return DateTimeHelper.toZonedDateTime(date, null); }
DateConverter implements AtlasConverter<Date> { @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE_TIME_TZ) public ZonedDateTime toZonedDateTime(Date date) { return DateTimeHelper.toZonedDateTime(date, null); } }
DateConverter implements AtlasConverter<Date> { @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE_TIME_TZ) public ZonedDateTime toZonedDateTime(Date date) { return DateTimeHelper.toZonedDateTime(date, null); }  }
DateConverter implements AtlasConverter<Date> { @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE_TIME_TZ) public ZonedDateTime toZonedDateTime(Date date) { return DateTimeHelper.toZonedDateTime(date, null); }  @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DECIMAL) BigDecimal toBigDecimal(Date date); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.BIG_INTEGER) BigInteger toBigInteger(Date date); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.BYTE, concerns = AtlasConversionConcern.RANGE) Byte toByte(Date value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE_TIME_TZ) Calendar toCalendar(Date date); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DOUBLE) Double toDouble(Date value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.FLOAT) Float toFloat(Date value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.INTEGER, concerns = AtlasConversionConcern.RANGE) Integer toInteger(Date value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE_TIME_TZ) GregorianCalendar toGregorianCalendar(Date date, String sourceFormat, String targetFormat); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE) LocalDate toLocalDate(Date date, String sourceFormat, String targetFormat); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE_TIME) LocalDateTime toLocalDateTime(Date date, String sourceFormat, String targetFormat); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.TIME) LocalTime toLocalTime(Date date, String sourceFormat, String targetFormat); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.LONG) Long toLong(Date date); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.NUMBER) Number toNumber(Date date); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.SHORT, concerns = AtlasConversionConcern.RANGE) Short toShort(Date value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE) java.sql.Date toSqlDate(Date date, String sourceFormat, String targetFormat); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.TIME) Time toSqlTime(Date date, String sourceFormat, String targetFormat); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.STRING) String toString(Date date); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE_TIME) Timestamp toSqlTimestamp(Date date); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE_TIME_TZ) ZonedDateTime toZonedDateTime(Date date); }
DateConverter implements AtlasConverter<Date> { @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE_TIME_TZ) public ZonedDateTime toZonedDateTime(Date date) { return DateTimeHelper.toZonedDateTime(date, null); }  @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DECIMAL) BigDecimal toBigDecimal(Date date); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.BIG_INTEGER) BigInteger toBigInteger(Date date); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.BYTE, concerns = AtlasConversionConcern.RANGE) Byte toByte(Date value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE_TIME_TZ) Calendar toCalendar(Date date); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DOUBLE) Double toDouble(Date value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.FLOAT) Float toFloat(Date value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.INTEGER, concerns = AtlasConversionConcern.RANGE) Integer toInteger(Date value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE_TIME_TZ) GregorianCalendar toGregorianCalendar(Date date, String sourceFormat, String targetFormat); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE) LocalDate toLocalDate(Date date, String sourceFormat, String targetFormat); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE_TIME) LocalDateTime toLocalDateTime(Date date, String sourceFormat, String targetFormat); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.TIME) LocalTime toLocalTime(Date date, String sourceFormat, String targetFormat); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.LONG) Long toLong(Date date); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.NUMBER) Number toNumber(Date date); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.SHORT, concerns = AtlasConversionConcern.RANGE) Short toShort(Date value); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE) java.sql.Date toSqlDate(Date date, String sourceFormat, String targetFormat); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.TIME) Time toSqlTime(Date date, String sourceFormat, String targetFormat); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.STRING) String toString(Date date); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE_TIME) Timestamp toSqlTimestamp(Date date); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE_TIME_TZ) ZonedDateTime toZonedDateTime(Date date);  }