Example usage for java.time ZonedDateTime withFixedOffsetZone

List of usage examples for java.time ZonedDateTime withFixedOffsetZone

Introduction

In this page you can find the example usage for java.time ZonedDateTime withFixedOffsetZone.

Prototype

public ZonedDateTime withFixedOffsetZone() 

Source Link

Document

Returns a copy of this date-time with the zone ID set to the offset.

Usage

From source file:Main.java

public static void main(String[] args) {
    ZonedDateTime dateTime = ZonedDateTime.now();
    ZonedDateTime l = dateTime.withFixedOffsetZone();
    System.out.println(l);/*w  w w  . j av  a2 s  .co  m*/
}