Example usage for java.time OffsetDateTime plusHours

List of usage examples for java.time OffsetDateTime plusHours

Introduction

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

Prototype

public OffsetDateTime plusHours(long hours) 

Source Link

Document

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

Usage

From source file:Main.java

public static void main(String[] args) {
    OffsetDateTime o = OffsetDateTime.now();
    OffsetDateTime d = o.plusHours(20);
    System.out.println(d);//  w w w  .j ava2  s  .  c  o m
}