Format the given integer timestamp value into a date/time string.
494625
private String formatTimestamp(String value) {
        try {
            long longValue = Long.parseLong(value);
            return Utils.formatDate(longValue);
        } catch (NumberFormatException e) {
            return "Invalid timestamp: " + value; 
        }
    }
97248
def CopyToDateTimeString(self):
    
    if (self._timestamp is None or self._timestamp < self._INT64_MIN or
        self._timestamp > self._INT64_MAX):
      return None

    return super(JavaTime, self).CopyToDateTimeString()
899681
def TimestampToRDFDatetime(timestamp):
  """"""
  # TODO(hanuszczak): `timestamp` should be of MySQL type `Decimal`. However,
  # it is unclear where this type is actually defined and how to import it in
  # order to have a type assertion.
  if timestamp is None:
    return None
  else:
    micros = int(1000000 * timestamp)
    return rdfvalue.RDFDatetime.FromMicrosecondsSinceEpoch(micros)
778300
def get_timestamp_info(value):
    
    value, offset = _split_offset(value)
    fmt, microsec = _get_timestamp_format(value)
    dt_value = _datetime_obj_factory(value, fmt)
    return dt_value, fmt, offset, microsec
655779
function formatDate(date) {
  let timestamp;
  if (date instanceof Date) {
    // Datadog expects seconds.
    timestamp = Math.round(date.getTime() / 1000);
  } else if (date instanceof Number) {
    // Make sure it is an integer, not a float.
    timestamp = Math.round(date);
  }
  return timestamp;
}
920622
def to_timestamp(val):
    
    # If we're given a number, give it right back - it's already a timestamp.
    if isinstance(val, numbers.Number):
        return val
    elif isinstance(val, six.string_types):
        dt = _parse_datetime_string(val)
    else:
        dt = val
    return time.mktime(dt.timetuple())
882867
function convertToTimestamp(value) {
    if (value instanceof Date) {
      return value.getTime();
    } else if (typeof value === 'number') {
      return Math.floor(value);
    } else if (typeof value === 'string') {
      return Date.parse(value);
    } else {
      return NaN;
    }
  }
1144068
def timestamp_to_datetime(response):
    ""
    if not response:
        return None
    try:
        response = int(response)
    except ValueError:
        return None
    return datetime.datetime.fromtimestamp(response)
729662
public static String timestampToString(Timestamp ts) {
        return TIMESTAMP_FORMAT.get().format(ts)
                + String.format(".%09d-00:00", ts.getNanos());
    }
751256
def _x_format(self):
        """"""

        def date_to_str(x):
            d = datetime.utcfromtimestamp(x).date()
            return self.x_value_formatter(d)

        return date_to_str
667302
def timestamp(value, timezone=None):
    
    if isinstance(value, str):
        try:
            value = pd.Timestamp(value, tz=timezone)
        except pd.errors.OutOfBoundsDatetime:
            value = dateutil.parser.parse(value)
    if isinstance(value, numbers.Integral):
        raise TypeError(
            (
                "Passing an integer to ibis.timestamp is not supported. Use "
                "ibis.literal({value:d}).to_timestamp() to create a timestamp "
                "expression from an integer."
            ).format(value=value)
        )
    return literal(value, type=dt.Timestamp(timezone=timezone))
1249311
def pp_timestamp(t):
    
    if t is None:
        return ''
    h, m, s = int(t / 3600), int(t / 60 % 60), t % 60
    return "%02d:%02d:%05.2f" % (h, m, s)
544851
function formatTime(time) {
  let date = new Date(time);

  return (date.getFullYear() + '-' +
    zeroPad(date.getMonth() + 1) + '-' +
    zeroPad(date.getDate()) + ' ' +
    zeroPad(date.getHours()) + ':' +
    zeroPad(date.getMinutes()) + ':' +
    zeroPad(date.getSeconds()));

  function zeroPad(num) {
    return ('0' + num).slice(-2)
  }
}
247039
def convert_timestamp(timestamp):
    
    datetime = dt.datetime.utcfromtimestamp(timestamp/1000.)
    return np.datetime64(datetime.replace(tzinfo=None))
807450
private String formatTime(Date value)
   {
      return (value == null ? null : m_formats.getTimeFormat().format(value));
   }
859346
def time_to_str(timestamp: int) -> str:
    
    datetimestamp = datetime.datetime.fromtimestamp(timestamp)
    return '{:04d}-{:02d}-{:02d}-{:02d}-{:02d}-{:02d}'.format(
            datetimestamp.year, datetimestamp.month, datetimestamp.day,
            datetimestamp.hour, datetimestamp.minute, datetimestamp.second
    )
266050
def timestamp(self, timestamp):
        """"""
        if timestamp is None:
            self._timestamp = datetime.utcnow()
        elif isinstance(timestamp, datetime):
            self._timestamp = timestamp
        else:
            self._timestamp = datetime.strptime(timestamp, fmt)