Lines Matching defs:timestamp

2998     timestamp: object
3001 Create a date from a POSIX timestamp.
3003 The timestamp is a number, e.g. created via time.time(), that is interpreted
3008 datetime_date_fromtimestamp(PyTypeObject *type, PyObject *timestamp)
3011 return date_fromtimestamp((PyObject *) type, timestamp);
3021 PyObject *timestamp;
3024 if (PyArg_UnpackTuple(args, "fromtimestamp", 1, 1, &timestamp)) {
3025 result = date_fromtimestamp(cls, timestamp);
5013 "timestamp out of range for platform time_t");
5096 * Build datetime from a Python timestamp. Pass localtime or gmtime for f,
5097 * to control the interpretation of the timestamp. Since a double doesn't
5103 datetime_from_timestamp(PyObject *cls, TM_FUNC f, PyObject *timestamp,
5109 if (_PyTime_ObjectToTimeval(timestamp,
5154 * precision of a timestamp.
5171 * precision of a timestamp.
5179 /* Return new local datetime from timestamp (Python timestamp -- a double). */
5184 PyObject *timestamp;
5186 static char *keywords[] = {"timestamp", "tz", NULL};
5189 keywords, &timestamp, &tzinfo))
5197 timestamp,
5206 /* Return new UTC datetime from timestamp (Python timestamp -- a double). */
5210 PyObject *timestamp;
5213 if (PyArg_ParseTuple(args, "O:utcfromtimestamp", &timestamp))
5214 result = datetime_from_timestamp(cls, _PyTime_gmtime, timestamp,
6085 local_timezone_from_timestamp(time_t timestamp)
6093 if (_PyTime_localtime(timestamp, &local_time_tm) != 0)
6114 if (_PyTime_gmtime(timestamp, &utc_time_tm) != 0)
6149 time_t timestamp;
6168 timestamp = _PyLong_AsTime_t(seconds);
6170 if (timestamp == -1 && PyErr_Occurred())
6172 return local_timezone_from_timestamp(timestamp);
6183 time_t timestamp;
6194 timestamp = seconds - epoch;
6195 return local_timezone_from_timestamp(timestamp);
6534 PyDoc_STR("timestamp[, tz] -> tz's local time from POSIX timestamp.")},
6538 PyDoc_STR("Construct a naive UTC datetime from a POSIX timestamp.")},
6570 {"timestamp", (PyCFunction)datetime_timestamp, METH_NOARGS,
6571 PyDoc_STR("Return POSIX timestamp as float.")},