OffsetTime plus(TemporalAmount amountToAdd)
returns a copy of this time with the specified amount added.
plus
has the following syntax.
public OffsetTime plus(TemporalAmount amountToAdd)
The following example shows how to use plus
.
import java.time.OffsetTime; import java.time.Period; //from w w w . j a v a 2 s. c o m public class Main { public static void main(String[] args) { OffsetTime m = OffsetTime.now(); OffsetTime n = m.plus(Period.ofDays(12)); System.out.println(n); } }