Here you can find the source of zoneDateTime2long(final ZonedDateTime zdt)
Parameter | Description |
---|---|
zdt | ZonedDateTime Object. |
public static long zoneDateTime2long(final ZonedDateTime zdt)
//package com.java2s; //License from project: Open Source License import java.time.ZonedDateTime; public class Main { /**// w w w.j av a2s . c o m * convert ZonedDateTime to millisecond(long). * @param zdt ZonedDateTime Object. * @return millisecond(long) */ public static long zoneDateTime2long(final ZonedDateTime zdt) { return zdt.toInstant().toEpochMilli(); } }