/** * Returns a CORBA UtcT that represents an instant that lies a given number of CORBA time units * (100 ns) in the future. If the argument is negative, returns null. */ public static UtcT corbaFuture(long corbaUnits) { if (corbaUnits < 0) { return null; } UtcT result = corbaTime(); result.time = result.time + corbaUnits; return result; }
/** * Converts the given unixTime into a CORBA UtcT. * * @param unixTime the number of milliseconds since 1970/01/01 00:00 UTC. */ public static UtcT corbaTime(long unixTime) { UtcT result = new UtcT(); result.time = (unixTime * 10000) + UNIX_OFFSET; // unixTime is always UTC. // Therefore, no time zone offset. result.tdf = 0; // nothing reasonable to put here result.inacchi = 0; result.inacclo = 0; return result; }