OffsetTime minusHours(long hours)
returns a copy of this OffsetTime with the specified period in hours subtracted.
minusHours
has the following syntax.
public OffsetTime minusHours(long hours)
The following example shows how to use minusHours
.
import java.time.OffsetTime; /*from w w w . java 2 s .c om*/ public class Main { public static void main(String[] args) { OffsetTime m = OffsetTime.now(); OffsetTime n = m.minusHours(14); System.out.println(n); } }
The code above generates the following result.