OffsetTime minusSeconds(long seconds) example
Description
OffsetTime minusSeconds(long seconds)
returns a copy of this OffsetTime with the specified period in seconds subtracted.
Syntax
minusSeconds
has the following syntax.
public OffsetTime minusSeconds(long seconds)
Example
The following example shows how to use minusSeconds
.
import java.time.OffsetTime;
/*ww w.ja v a2s . co m*/
public class Main {
public static void main(String[] args) {
OffsetTime m = OffsetTime.now();
OffsetTime n = m.minusSeconds(1234);
System.out.println(n);
}
}
The code above generates the following result.