/*
Get the time stamp
352604
protected static function getTime() {
		$mtime = microtime();
		$mtime = explode(" ",$mtime); 
		$mtime = $mtime[1] + $mtime[0]; 
		return $mtime;
	}
124109
function consumeTimeStamp() {
      var ts = parseTimeStamp(input);
      if (ts === null) {
        throw new ParsingError(ParsingError.Errors.BadTimeStamp,
                              "Malformed timestamp: " + oInput);
      }
      // Remove time stamp from input.
      input = input.replace(/^[^\sa-zA-Z-]+/, "");
      return ts;
    }
807697
def get_timestamp(dt=None):
    '''
    
    '''

    if dt is None: dt = datetime.datetime.utcnow()
    t = dt.utctimetuple()

    return calendar.timegm(t)
678965
@Nullable
  public Date timestamp() {
    // It's unclear if this will ever be null. So we're being safe.
    String timestamp = getString(TIMESTAMP_KEY);
    if (isNullOrEmpty(timestamp)) {
      return null;
    }
    return parseISO8601Date(timestamp);
  }
498524
function getMonthDays(timestamp = Date.now()) {
  const cursorDay = new Date(new Date(timestamp).setDate(1));
  const currentMonth = cursorDay.getMonth();
  const days = [];
  while (cursorDay.getMonth() === currentMonth) {
    days.push(cursorDay.getTime());
    cursorDay.setDate(cursorDay.getDate() + 1);
  }
  return days;
}
1234238
static function getTimestamp( $name, $default = false )
    {
        $handler = eZExpiryHandler::instance();
        if ( !isset( $handler->Timestamps[$name] ) )
        {
            return $default;
        }
        return $handler->Timestamps[$name];
    }
321657
private String getTimestamp() {
		if (timeOffset == null)
			syncTime();
		long now = System.currentTimeMillis() / 1000L;
		now -= timeOffset;
		return Long.toString(now);
	}
12115
@SuppressWarnings("unchecked")
  public Timestamp getTimestamp(String name) {
    return ((Value<Timestamp>) getValue(name)).get();
  }
732342
public function getCreatedAtTimestamp(): ?int
    {
        if (!$this->hasCreatedAt()) {
            return null;
        }

	    $timestamp = strtotime($this->getCreatedAt() . 'UTC');

	    if ($timestamp === false) {
		    throw new Exception("Unable to get timestamp from \"{$this->getCreatedAt()}\"");
	    }

	    return $timestamp;
    }
389600
function timestamp () {
  const date = new Date()

  return [
    zeropad(date.getHours()),
    zeropad(date.getMinutes()),
    zeropad(date.getSeconds())
  ].join(':')
}
487140
public static function ts()
    {
        static $time = null;

        if(null !== $time) {
            return $time;
        }

        $time = isset($_SERVER['REQUEST_TIME'])
            ? $_SERVER['REQUEST_TIME']
            : time();

        return $time;
    }
630913
function timeStamp()
    {
        $cur_date = getdate();
        $longtimestamp = mktime( $this->hour(),
                                 $this->minute(),
                                 $this->second(),
                                 $cur_date[ 'mon' ],
                                 $cur_date[ 'mday' ],
                                 $cur_date[ 'year' ] );
        return $longtimestamp;
    }
1172166
function getTime(ts) {
		function pad2(n) {
			return n < 10 ? '0' + n : n;
		}

		function pad3(n) {
			return n < 10 ? '00' + n : (n < 100 ? '0' + n : n);
		}

		return pad2(ts.getHours()) + ':' +
			pad2(ts.getMinutes()) + ':' +
			pad2(ts.getSeconds()) + '.' +
			pad3(ts.getMilliseconds());
	}
907816
public Date getTimestampProperty(String pstrSection, String pstrProp)
    {
        Timestamp   tsRet   = null;
        Date        dtTmp   = null;
        String      strVal  = null;
        DateFormat  dtFmt   = null;
        INIProperty objProp = null;
        INISection  objSec  = null;

        objSec = (INISection) this.mhmapSections.get(pstrSection);
        if (objSec != null)
        {
            objProp = objSec.getProperty(pstrProp);
            try
            {
                if (objProp != null) strVal = objProp.getPropValue();
                if (strVal != null)
                {
                    dtFmt = new SimpleDateFormat(this.mstrDateFmt);
                    dtTmp = dtFmt.parse(strVal);
                    tsRet = new Timestamp(dtTmp.getTime());
                }
            }
            catch (ParseException PExIgnore)
            {
            }
            catch (IllegalArgumentException IAEx)
            {
            }
            finally
            {
                if (objProp != null) objProp = null;
            }
            objSec = null;
        }
        return tsRet;
    }
133258
public Stamp getStamp() {
    checkClosed();

    TimeRequest tr = new TimeRequest();
    try {
      queue.put(tr);
      int timeout = env.getConfiguration().getConnectionRetryTimeout();
      if (timeout < 0) {
        long waitPeriod = 1;
        long waitTotal = 0;
        while (!tr.cdl.await(waitPeriod, TimeUnit.SECONDS)) {
          checkClosed();
          waitTotal += waitPeriod;
          if (waitPeriod < MAX_ORACLE_WAIT_PERIOD) {
            waitPeriod *= 2;
          }
          log.warn(
              "Waiting for timestamp from Oracle. Is it running? Client has waited a total of {}s and will retry in {}s",
              waitTotal, waitPeriod);
        }
      } else if (!tr.cdl.await(timeout, TimeUnit.MILLISECONDS)) {
        throw new FluoException("Timed out (after " + timeout
            + "ms) trying to retrieve timestamp from Oracle.  Is the Oracle running?");
      }
    } catch (InterruptedException e) {
      throw new FluoException("Interrupted while retrieving timestamp from Oracle", e);
    }
    return tr.stampRef.get();
  }
309845
function _getTimeLeft(timeout) {
        return Math.ceil(timeout._idleStart + timeout._idleTimeout - Date.now());
      }
204725
public function getTimestamp()
    {
        if ($this->isNull($this->value)) {
            return null;
        }
        $value = strtotime($this->getValue());

        return $value ?: null;
    }