LocalDate to ms. - Java java.time

Java examples for java.time:LocalDate

Description

LocalDate to ms.

Demo Code


//package com.java2s;

import java.time.LocalDate;

import java.time.ZoneOffset;

public class Main {
    /**/*  w w  w .  j a  va2s .c om*/
     * LocalDate to ms.
     * @param ld
     * @return ms
     */
    public static long localDate2ms(final LocalDate ld) {
        return ld.atStartOfDay().toEpochSecond(ZoneOffset.ofHours(9)) * 1000L;
    }
}

Related Tutorials