Java ZonedDateTime Calculate zoneDateTime2long(final ZonedDateTime zdt)

Here you can find the source of zoneDateTime2long(final ZonedDateTime zdt)

Description

convert ZonedDateTime to millisecond(long).

License

Open Source License

Parameter

Parameter Description
zdt ZonedDateTime Object.

Return

millisecond(long)

Declaration

public static long zoneDateTime2long(final ZonedDateTime zdt) 

Method Source Code

//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();
    }
}

Related

  1. toLocalDateString(ZonedDateTime zonedDateTime)
  2. toUTCZonedDateTime(String dateString)
  3. toZeroMSN(ZonedDateTime dateTime)
  4. uaDateTimeFromTime(ZonedDateTime time)
  5. Youngest(ZonedDateTime ZDT1, ZonedDateTime ZDT2)