Gets the timestamp that DateTieredCompactionStrategy considers to be the "current time".
@return the maximum timestamp across all SSTables.
@throws java.util.NoSuchElementException if there are no SSTables.
10786
private long getNow()
    {
        return Collections.max(cfs.getSSTables(), new Comparator<SSTableReader>()
        {
            public int compare(SSTableReader o1, SSTableReader o2)
            {
                return Long.compare(o1.getMaxTimestamp(), o2.getMaxTimestamp());
            }
        }).getMaxTimestamp();
    }
188832
@Override
    public Timestamp getTimestamp(String parameterName, Calendar cal) throws SQLException
    {
        checkClosed();
        throw SQLError.noSupport();
    }
608032
public static Date getCurrentDateTime() {
        java.util.Calendar calNow = java.util.Calendar.getInstance();
        java.util.Date dtNow = calNow.getTime();

        return dtNow;
    }
1363706
public long getPersistentTimestamp() throws ChronosException {
    byte[] persistentTimesampBytes = null;
    for (int i = 0; i <= connectRetryTimes; ++i) {
      try {
        persistentTimesampBytes = ZooKeeperUtil.getDataAndWatch(this, persistentTimestampZnode);
        break;
      } catch (KeeperException e) {
        if (i == connectRetryTimes) {
          throw new ChronosException(
              "Can't get persistent timestamp from ZooKeeper after retrying", e);
        }
        LOG.info("Exception to get persistent timestamp from ZooKeeper, retry " + (i + 1) + " times");
      }
    }

    if (Arrays.equals(persistentTimesampBytes, new byte[0])) {
      persistentTimestamp = 0; // for the very first time
    } else {
      persistentTimestamp = ZooKeeperUtil.bytesToLong(persistentTimesampBytes);
    }

    if (LOG.isDebugEnabled()) {
      LOG.debug("Return persistent timestamp " + persistentTimestamp + " to timestamp server");
    }
    return persistentTimestamp;
  }
1272875
public static Timestamp now() {
    java.sql.Timestamp date = new java.sql.Timestamp(System.currentTimeMillis());
    return of(date);
  }
745382
public static Timestamp generateTimestamp() {
		Instant time = Instant.now();
		Timestamp timestamp = Timestamp.newBuilder().setSeconds(time.getEpochSecond())
				.setNanos(time.getNano()).build();
		return timestamp;
	}
606409
private static int getTimeToLive(final Ticket ticket) {
        val expTime = ticket.getExpirationPolicy().getTimeToLive().intValue();
        if (TimeUnit.SECONDS.toDays(expTime) >= MAX_EXP_TIME_IN_DAYS) {
            LOGGER.warn("Any expiration time larger than [{}] days in seconds is considered absolute (as in a Unix time stamp) "
                + "anything smaller is considered relative in seconds.", MAX_EXP_TIME_IN_DAYS);

        }
        return expTime;
    }
1366954
public static String getTimestamp(boolean withMsec) {
        return (withMsec ? SafeDateFormatter.getDateFormat(PATTERN_MSEC).format(new Date()) :
            SafeDateFormatter.getDateFormat(PATTERN).format(new Date()));
    }
355487
public long getNextIncludedTime (final long timeStamp)
  {
    if (timeStamp <= 0)
      throw new IllegalArgumentException ("timeStamp must be greater 0");

    if (m_aBaseCalendar != null)
    {
      return m_aBaseCalendar.getNextIncludedTime (timeStamp);
    }

    return timeStamp;
  }
649649
public String createTimestamp() {
	Date date = new Date();
	//SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd H:mm:ss");
	SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
	String formattedDate = sdf.format(date);
	return formattedDate;
    }
886748
public PactDslJsonArray timestamp() {
      String pattern = DateFormatUtils.ISO_DATETIME_FORMAT.getPattern();
      body.put(DateFormatUtils.ISO_DATETIME_FORMAT.format(new Date(DATE_2000)));
      generators.addGenerator(Category.BODY, rootPath + appendArrayIndex(0), new DateTimeGenerator(pattern));
      matchers.addRule(rootPath + appendArrayIndex(0), matchTimestamp(pattern));
      return this;
    }
235723
protected Timestamp readTimestamp() throws IOException {
		int inc = _in.readInt();
		int time = _in.readInt();
		return new Timestamp(time, inc);
	}
281920
public XMLGregorianCalendar getTimeStamp()
   {
       GregorianCalendar cal = new GregorianCalendar();
       DatatypeFactory dt;
       try {
           dt = DatatypeFactory.newInstance();
           return dt.newXMLGregorianCalendar(cal);
       } catch (DatatypeConfigurationException e) {
           e.printStackTrace();
       }
       return null;
   }
672898
@JsonProperty
    public String timestamp() {
        if (timestampAsText == null) {
            timestampAsText = DateTimeFormatter.ISO_INSTANT.format(timestamp);
        }
        return timestampAsText;
    }
617996
public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() {
    if (typeCase_ == 5) {
      return (com.google.protobuf.Timestamp) type_;
    }
    return com.google.protobuf.Timestamp.getDefaultInstance();
  }
725294
public static String currentDefaultFormattedTimeStamp() {
		try {
			SimpleDateFormat sdf = new SimpleDateFormat(DEFAULT_TIME_STAMP_FORMAT);
			return sdf.format(new Date());
		} catch (IllegalArgumentException e) {
			SimpleDateFormat sdf = new SimpleDateFormat(SAFE_TIME_STAMP_FORMAT);
			return sdf.format(new Date());
		}
	}
1304237
public function getTimeStamp()
    {
        if ($this->exists && !isset($this->timestamp)) {
            $this->timestamp = @filemtime($this->filepath);
        }
        return $this->timestamp;
    }