/** * Transforms a Java type into the corresponding OMERO RType. * @param value Java concrete type value. * @return RType or <code>null</code> if <code>value</code> is * <code>null</code>. */ public RTime toRType(Timestamp value) { return value == null? null : rtime(value.asInstant().getMillis()); }
Timestamp t = Timestamp.valueOf(text); if (t != null) timestamp = t.asInstant().getMillis() / 1000d;
Timestamp t = Timestamp.valueOf(text); if (t != null) timestamp = t.asInstant().getMillis() / 1000d;
Timestamp timestamp = Timestamp.valueOf(date); if (timeIndex >= 0 && timestamp != null) { long ms = timestamp.asInstant().getMillis(); for (int i=0; i<getImageCount(); i++) { int[] zct = getZCTCoords(i);
Timestamp timestamp = Timestamp.valueOf(date); if (timeIndex >= 0 && timestamp != null) { long ms = timestamp.asInstant().getMillis(); for (int i=0; i<getImageCount(); i++) { int[] zct = getZCTCoords(i);
p.deltaT = new Timestamp(value).asInstant().getMillis() / 1000d;
p.deltaT = new Timestamp(value).asInstant().getMillis() / 1000d;
String date = DateTools.convertDate(ms, DateTools.COBOL); Timestamp timestamp = Timestamp.valueOf(date); if (timestamp != null && timestamp.asInstant().getMillis() < System.currentTimeMillis())
String date = DateTools.convertDate(ms, DateTools.COBOL); Timestamp timestamp = Timestamp.valueOf(date); if (timestamp != null && timestamp.asInstant().getMillis() < System.currentTimeMillis())
private long getTimestamp(String file) throws FormatException, IOException { try (RandomAccessInputStream s = new RandomAccessInputStream(file, 16)) { TiffParser parser = new TiffParser(s); parser.setDoCaching(false); IFD firstIFD = parser.getFirstIFD(); if (firstIFD != null) { TiffIFDEntry timestamp = (TiffIFDEntry) firstIFD.get(IFD.DATE_TIME); if (timestamp != null) { String stamp = parser.getIFDValue(timestamp).toString(); stamp = DateTools.formatDate(stamp, BaseTiffReader.DATE_FORMATS, "."); Timestamp t = Timestamp.valueOf(stamp); return t.asInstant().getMillis(); // NPE if invalid input. } } } return new Location(file).lastModified(); }
private long getTimestamp(String file) throws FormatException, IOException { try (RandomAccessInputStream s = new RandomAccessInputStream(file, 16)) { TiffParser parser = new TiffParser(s); parser.setDoCaching(false); IFD firstIFD = parser.getFirstIFD(); if (firstIFD != null) { TiffIFDEntry timestamp = (TiffIFDEntry) firstIFD.get(IFD.DATE_TIME); if (timestamp != null) { String stamp = parser.getIFDValue(timestamp).toString(); stamp = DateTools.formatDate(stamp, BaseTiffReader.DATE_FORMATS, "."); Timestamp t = Timestamp.valueOf(stamp); return t.asInstant().getMillis(); // NPE if invalid input. } } } return new Location(file).lastModified(); }
Timestamp t = Timestamp.valueOf(acquiredDate); if (t != null) startTime = t.asInstant().getMillis() / 1000d;
Timestamp t = Timestamp.valueOf(acquiredDate); if (t != null) startTime = t.asInstant().getMillis() / 1000d;
long timestampSeconds = date.asInstant().getMillis() / 1000;
long timestampSeconds = date.asInstant().getMillis() / 1000;