Java LocalDateTime to fromLocalDateTime(LocalDateTime _ldt)

Here you can find the source of fromLocalDateTime(LocalDateTime _ldt)

Description

Get LocalDateTime as Instant for defined localZone

License

Open Source License

Declaration

public static final Instant fromLocalDateTime(LocalDateTime _ldt) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.time.Instant;

import java.time.LocalDateTime;

import java.time.ZoneOffset;

public class Main {
    public static final ZoneOffset localZoneOffset = ZoneOffset.UTC;

    /**//from   w w w .j av  a  2s.c  om
     * Get LocalDateTime as Instant for defined localZone <br>
     * 
     */
    public static final Instant fromLocalDateTime(LocalDateTime _ldt) {
        return _ldt.toInstant(localZoneOffset);
    }
}

Related

  1. convertLocalDateTimeToDateInUTC(final LocalDateTime ldt)
  2. convertToDate(LocalDateTime dateTime)
  3. getDate(LocalDateTime time)
  4. getDateTimeText(LocalDateTime dateTime)
  5. getDelayUntil(final LocalDateTime ldt)
  6. getDifference(LocalDateTime sourceTime, LocalDateTime targetTime)