Here you can find the source of millisToLocalDateTime(Long inMillis)
public static LocalDateTime millisToLocalDateTime(Long inMillis)
//package com.java2s; //License from project: Open Source License import java.time.LocalDateTime; import java.time.ZoneId; import java.util.Date; public class Main { public static LocalDateTime millisToLocalDateTime(Long inMillis) { return millisToLocalDateTime(inMillis, ZoneId.systemDefault()); }//w w w.ja va 2 s .co m public static LocalDateTime millisToLocalDateTime(Long inMillis, ZoneId inZoneId) { if (inMillis == null) { inMillis = System.currentTimeMillis(); } if (inZoneId == null) { inZoneId = ZoneId.systemDefault(); } return LocalDateTime.ofInstant(new Date(inMillis).toInstant(), inZoneId); } }