Java LocalDateTime to localDateTimeToTimestamp(LocalDateTime ldt)

Here you can find the source of localDateTimeToTimestamp(LocalDateTime ldt)

Description

local Date Time To Timestamp

License

Apache License

Declaration

public static long localDateTimeToTimestamp(LocalDateTime ldt) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.time.LocalDateTime;
import java.time.ZoneOffset;

public class Main {
    public static long localDateTimeToTimestamp(LocalDateTime ldt) {
        return ldt.toEpochSecond(ZoneOffset.UTC);
    }// ww w .j a v a2  s.  c  o m
}

Related

  1. getMinuteOfDay(LocalDateTime ldt)
  2. getSecondsSinceJavaEpoch(LocalDateTime localDateTime)
  3. localDateTimeToDate(LocalDateTime ldt)
  4. localDateTimeToEpochMillis(TemporalAccessor temporal)
  5. localDateTimeToString(LocalDateTime value)
  6. longTOLocalDateTime(long minDate)
  7. luisDate(LocalDateTime date)
  8. millisToLocalDateTime(Long inMillis)
  9. toDate(LocalDateTime dateTime)