Example usage for java.time OffsetDateTime adjustInto

List of usage examples for java.time OffsetDateTime adjustInto

Introduction

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

Prototype

@Override
public Temporal adjustInto(Temporal temporal) 

Source Link

Document

Adjusts the specified temporal object to have the same offset, date and time as this object.

Usage

From source file:Main.java

public static void main(String[] args) {
    OffsetDateTime o = OffsetDateTime.now();
    Temporal d = o.adjustInto(OffsetDateTime.now(ZoneId.systemDefault()));
    System.out.println(d);/*ww w .j  a v a 2  s.c  om*/
}