Example usage for java.time ZoneOffset adjustInto

List of usage examples for java.time ZoneOffset adjustInto

Introduction

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

Prototype

@Override
public Temporal adjustInto(Temporal temporal) 

Source Link

Document

Adjusts the specified temporal object to have the same offset as this object.

Usage

From source file:Main.java

public static void main(String[] args) {
    ZoneOffset z = ZoneOffset.UTC;
    Temporal t = z.adjustInto(ZonedDateTime.now());
    System.out.println(t);/* ww  w.  j  a  va2 s. co m*/
}