Java ZonedDateTime Create toZonedDateTime(long epochSeconds)

Here you can find the source of toZonedDateTime(long epochSeconds)

Description

to Zoned Date Time

License

Apache License

Declaration

public static ZonedDateTime toZonedDateTime(long epochSeconds) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.time.ZonedDateTime;

import java.time.Instant;
import java.time.ZoneId;

public class Main {
    public static ZonedDateTime toZonedDateTime(long epochSeconds) {
        Instant instant = Instant.ofEpochSecond(epochSeconds);
        ZonedDateTime datetime = ZonedDateTime.ofInstant(instant, ZoneId.systemDefault());
        return datetime;
    }//w  w  w. j av a2s  . c  o  m
}

Related

  1. toZonedDateTime(@Nullable Date date, @Nullable TimeZone zone)
  2. toZonedDateTime(Date utilDate)
  3. toZonedDateTime(long systemMillis)
  4. toZonedDateTime(Object cell)
  5. zonedDateTime(String date, ZoneId zoneId)
  6. zonedDateTimeOf(final ZonedDateTime time)