Example usage for java.time OffsetDateTime minusHours

List of usage examples for java.time OffsetDateTime minusHours

Introduction

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

Prototype

public OffsetDateTime minusHours(long hours) 

Source Link

Document

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

Usage

From source file:Main.java

public static void main(String[] args) {
    OffsetDateTime o = OffsetDateTime.now();
    OffsetDateTime d = o.minusHours(120);
    System.out.println(d);//from w  w w .  j a va2 s .  co  m
}