static < R extends ChronoLocalDate > ChronoZonedDateTimeImpl < R > ofInstant ( Chronology chrono , Instant instant , ZoneId zone ) { ZoneRules rules = zone . getRules ( ) ; ZoneOffset offset = rules . getOffset ( instant ) ; Jdk8Methods . requireNonNull ( offset , "offset" ) ; // protect against bad ZoneRules LocalDateTime ldt = LocalDateTime . ofEpochSecond ( instant . getEpochSecond ( ) , instant . getNano ( ) , offset ) ; @ SuppressWarnings ( "unchecked" ) ChronoLocalDateTimeImpl < R > cldt = ( ChronoLocalDateTimeImpl < R > ) chrono . localDateTime ( ldt ) ; return new ChronoZonedDateTimeImpl < R > ( cldt , offset , zone ) ; }
Obtains an instance from an instant using the specified time - zone .