Java Instant Calculate convertInstantToDotNetTicks(Instant instant)

Here you can find the source of convertInstantToDotNetTicks(Instant instant)

Description

convert Instant To Dot Net Ticks

License

Open Source License

Declaration

public static long convertInstantToDotNetTicks(Instant instant) 

Method Source Code

//package com.java2s;
/*/*from w w  w.  ja v  a 2s.  c  om*/
 * Copyright (c) Microsoft. All rights reserved.
 * Licensed under the MIT license. See LICENSE file in the project root for full license information.
 */

import java.time.Instant;

public class Main {
    private static final long EPOCHINDOTNETTICKS = 621355968000000000l;

    public static long convertInstantToDotNetTicks(Instant instant) {
        return (instant.getEpochSecond() * 10000000) + (instant.getNano() / 100) + EPOCHINDOTNETTICKS;
    }
}

Related

  1. convertToUserTimeZone(Instant timeInSystem, ZoneId userZoneId)
  2. dateOf(final Instant time)
  3. epochToInstant(long epochMilliSecond)
  4. getNquadsFile(final File dir, final Instant time)