Java ZonedDateTime to LocalDateTime toUtcZonedDateTime(LocalDateTime localDateTime)

Here you can find the source of toUtcZonedDateTime(LocalDateTime localDateTime)

Description

to Utc Zoned Date Time

License

Mozilla Public License

Declaration

public static ZonedDateTime toUtcZonedDateTime(LocalDateTime localDateTime) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2017 Stichting Yona Foundation This Source Code Form is subject to the terms of the Mozilla Public License, v.
 * 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
 *******************************************************************************/

import java.time.LocalDateTime;

import java.time.ZoneOffset;
import java.time.ZonedDateTime;

public class Main {
    public static ZonedDateTime toUtcZonedDateTime(LocalDateTime localDateTime) {
        return localDateTime.atZone(ZoneOffset.UTC);
    }//from www. j  av  a  2 s  .c om
}

Related

  1. toUtcLocalDateTime(ZonedDateTime zonedDateTime)