Example usage for java.time ZonedDateTime toOffsetDateTime

List of usage examples for java.time ZonedDateTime toOffsetDateTime

Introduction

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

Prototype

public OffsetDateTime toOffsetDateTime() 

Source Link

Document

Converts this date-time to an OffsetDateTime .

Usage

From source file:Main.java

public static void main(String[] args) {
    ZonedDateTime dateTime = ZonedDateTime.now();
    OffsetDateTime o = dateTime.toOffsetDateTime();
    System.out.println(o);/*from w ww .j  a v a2 s .  co  m*/
}