Java examples for java.time:ZonedDateTime
convert ZonedDateTime to millisecond(long).
//package com.java2s; import java.time.ZonedDateTime; public class Main { /**// w w w . j a v a2s. c om * convert ZonedDateTime to millisecond(long). * @param zdt ZonedDateTime Object. * @return millisecond(long) */ public static long zoneDateTime2long(final ZonedDateTime zdt) { return zdt.toInstant().toEpochMilli(); } }