Here you can find the source of getLocalDateTimeFromMillis(final long millis)
Parameter | Description |
---|---|
millis | UTC-basierter Datum/Zeit-Wert in ms |
public static LocalDateTime getLocalDateTimeFromMillis(final long millis)
//package com.java2s; /*/*w w w .ja v a2 s .c om*/ * Copyright 2014-2015 Christian Raue * MIT License http://opensource.org/licenses/mit-license.php */ import java.time.LocalDateTime; import java.time.temporal.ChronoUnit; public class Main { /** * @param millis UTC-basierter Datum/Zeit-Wert in ms * @return Datum/Zeit-Wert */ public static LocalDateTime getLocalDateTimeFromMillis(final long millis) { return LocalDateTime.of(1970, 1, 1, 0, 0, 0).plus(millis, ChronoUnit.MILLIS); } }