Example usage for java.time OffsetDateTime minusSeconds

List of usage examples for java.time OffsetDateTime minusSeconds

Introduction

In this page you can find the example usage for java.time OffsetDateTime minusSeconds.

Prototype

public OffsetDateTime minusSeconds(long seconds) 

Source Link

Document

Returns a copy of this OffsetDateTime with the specified number of seconds subtracted.

Usage

From source file:Main.java

public static void main(String[] args) {
    OffsetDateTime o = OffsetDateTime.now();
    OffsetDateTime d = o.minusSeconds(1200);
    System.out.println(d);/*  www  .  j a  v  a  2  s. co  m*/
}