Java examples for java.time:ZonedDateTime
get Arrival Time as ZonedDateTime
//package com.java2s; import java.time.ZoneId; import java.time.ZonedDateTime; public class Main { public static ZonedDateTime getArrivalTime(ZonedDateTime zonedDateTime, ZoneId zoneId, int hour, int minute) { return zonedDateTime.plusHours(hour).plusMinutes(minute) .withZoneSameInstant(zoneId); }//ww w .j a v a 2 s .co m }