Example usage for java.time ZonedDateTime ofStrict

List of usage examples for java.time ZonedDateTime ofStrict

Introduction

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

Prototype

public static ZonedDateTime ofStrict(LocalDateTime localDateTime, ZoneOffset offset, ZoneId zone) 

Source Link

Document

Obtains an instance of ZonedDateTime strictly validating the combination of local date-time, offset and zone ID.

Usage

From source file:Main.java

public static void main(String[] args) {
    ZonedDateTime z = ZonedDateTime.ofStrict(LocalDateTime.now(), ZoneOffset.UTC, ZoneId.systemDefault());

    System.out.println(z);//from  w w  w. jav a2  s .c  om

}