Java ZonedDateTime add Duration
import java.time.Duration; import java.time.LocalDateTime; import java.time.Period; import java.time.ZoneId; import java.time.ZonedDateTime; public class Main { public static void main(String[] args) { ZoneId usCentral = ZoneId.of("America/Chicago"); LocalDateTime ldt = LocalDateTime.now(); ZonedDateTime zdt1 = ZonedDateTime.of(ldt, usCentral); Period p1 = Period.ofDays(1); Duration d1 = Duration.ofHours(24); ZonedDateTime zdt2 = zdt1.plus(p1); ZonedDateTime zdt3 = zdt1.plus(d1); System.out.println(zdt1);//w ww. j ava 2 s . co m System.out.println(zdt2);//added one day System.out.println(zdt3);//add 24 hours } }