Here you can find the source of toEPICSTime(java.sql.Timestamp timestamp)
Parameter | Description |
---|
public static Instant toEPICSTime(java.sql.Timestamp timestamp)
//package com.java2s; /******************************************************************************* * Copyright (c) 2012 Oak Ridge National Laboratory. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************/ import java.time.Instant; public class Main { /** Convert SQL time stamp into EPICS time stamp * @param timestamp{@link java.sql.Timestamp} * @return {@link Instant}/*from ww w .jav a 2 s .co m*/ */ public static Instant toEPICSTime(java.sql.Timestamp timestamp) { return Instant.ofEpochSecond(timestamp.getTime() / 1000L, timestamp.getNanos()); } }