Java Code Examples for org.threeten.bp.ZonedDateTime#from()

The following examples show how to use org.threeten.bp.ZonedDateTime#from() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CustomInstantDeserializer.java    From openapi-generator with Apache License 2.0 4 votes vote down vote up
@Override
public ZonedDateTime apply(TemporalAccessor temporalAccessor) {
  return ZonedDateTime.from(temporalAccessor);
}
 
Example 2
Source File: CustomInstantDeserializer.java    From openapi-generator with Apache License 2.0 4 votes vote down vote up
@Override
public ZonedDateTime apply(TemporalAccessor temporalAccessor) {
  return ZonedDateTime.from(temporalAccessor);
}
 
Example 3
Source File: CustomInstantDeserializer.java    From openapi-generator with Apache License 2.0 4 votes vote down vote up
@Override
public ZonedDateTime apply(TemporalAccessor temporalAccessor) {
  return ZonedDateTime.from(temporalAccessor);
}
 
Example 4
Source File: CustomInstantDeserializer.java    From openapi-generator with Apache License 2.0 4 votes vote down vote up
@Override
public ZonedDateTime apply(TemporalAccessor temporalAccessor) {
  return ZonedDateTime.from(temporalAccessor);
}
 
Example 5
Source File: CustomInstantDeserializer.java    From openapi-generator with Apache License 2.0 4 votes vote down vote up
@Override
public ZonedDateTime apply(TemporalAccessor temporalAccessor) {
  return ZonedDateTime.from(temporalAccessor);
}
 
Example 6
Source File: CustomInstantDeserializer.java    From openapi-generator with Apache License 2.0 4 votes vote down vote up
@Override
public ZonedDateTime apply(TemporalAccessor temporalAccessor) {
  return ZonedDateTime.from(temporalAccessor);
}
 
Example 7
Source File: CustomInstantDeserializer.java    From openapi-generator with Apache License 2.0 4 votes vote down vote up
@Override
public ZonedDateTime apply(TemporalAccessor temporalAccessor) {
  return ZonedDateTime.from(temporalAccessor);
}
 
Example 8
Source File: CustomInstantDeserializer.java    From openapi-generator with Apache License 2.0 4 votes vote down vote up
@Override
public ZonedDateTime apply(TemporalAccessor temporalAccessor) {
  return ZonedDateTime.from(temporalAccessor);
}
 
Example 9
Source File: CustomInstantDeserializer.java    From openapi-generator with Apache License 2.0 4 votes vote down vote up
@Override
public ZonedDateTime apply(TemporalAccessor temporalAccessor) {
  return ZonedDateTime.from(temporalAccessor);
}
 
Example 10
Source File: CustomInstantDeserializer.java    From tutorials with MIT License 4 votes vote down vote up
@Override
public ZonedDateTime apply(TemporalAccessor temporalAccessor) {
  return ZonedDateTime.from(temporalAccessor);
}
 
Example 11
Source File: TestDateTimeParsing.java    From threetenbp with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Test(dataProvider = "instantNoZone", expectedExceptions = DateTimeException.class)
public void test_parse_instantNoZone_ZDT(DateTimeFormatter formatter, String text, Instant expected) {
    TemporalAccessor actual = formatter.parse(text);
    ZonedDateTime.from(actual);
}
 
Example 12
Source File: IsoChronology.java    From threetenbp with BSD 3-Clause "New" or "Revised" License 2 votes vote down vote up
/**
 * Obtains an ISO zoned date-time from another date-time object.
 * <p>
 * This is equivalent to {@link ZonedDateTime#from(TemporalAccessor)}.
 *
 * @param temporal  the date-time object to convert, not null
 * @return the ISO zoned date-time, not null
 * @throws DateTimeException if unable to create the date-time
 */
@Override  // override with covariant return type
public ZonedDateTime zonedDateTime(TemporalAccessor temporal) {
    return ZonedDateTime.from(temporal);
}