Example usage for java.time LocalDateTime atOffset

List of usage examples for java.time LocalDateTime atOffset

Introduction

In this page you can find the example usage for java.time LocalDateTime atOffset.

Prototype

public OffsetDateTime atOffset(ZoneOffset offset) 

Source Link

Document

Combines this date-time with an offset to create an OffsetDateTime .

Usage

From source file:Main.java

public static void main(String[] args) {
    LocalDateTime a = LocalDateTime.of(2014, 6, 30, 12, 00);

    OffsetDateTime b = a.atOffset(ZoneOffset.UTC);
    System.out.println(b);/*  ww  w . j  ava  2 s  . com*/
}