Here you can find the source of ms2LocalDateTime(final long ms)
Parameter | Description |
---|---|
ms | millisecond |
public static LocalDateTime ms2LocalDateTime(final long ms)
//package com.java2s; //License from project: Open Source License import java.time.Instant; import java.time.LocalDateTime; import java.time.ZoneId; public class Main { /**/*from ww w .j a v a 2s . co m*/ * ms -> LocalDateTime object. * @param ms millisecond * @return LocalDateTime */ public static LocalDateTime ms2LocalDateTime(final long ms) { return LocalDateTime.ofInstant(Instant.ofEpochMilli(ms), ZoneId.systemDefault()); } }