Here you can find the source of convertDotNetTicksToInstant(long dotNetTicks)
public static Instant convertDotNetTicksToInstant(long dotNetTicks)
//package com.java2s; /*/*from ww w . java 2 s . com*/ * 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 Instant convertDotNetTicksToInstant(long dotNetTicks) { long ticksFromEpoch = dotNetTicks - EPOCHINDOTNETTICKS; long millisecondsFromEpoch = ticksFromEpoch / 10000; long fractionTicks = ticksFromEpoch % 10000; return Instant.ofEpochMilli(millisecondsFromEpoch).plusNanos(fractionTicks * 100); } }