Here you can find the source of toUtcZonedDateTime(LocalDateTime localDateTime)
public static ZonedDateTime toUtcZonedDateTime(LocalDateTime localDateTime)
//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 }