numpy
2.0.0
|
#include <Python.h>
#include <time.h>
#include <numpy/arrayobject.h>
#include "npy_config.h"
#include "npy_pycompat.h"
#include "numpy/arrayscalars.h"
#include "methods.h"
#include "_datetime.h"
#include "datetime_strings.h"
#define _MULTIARRAYMODULE |
#define NPY_NO_DEPRECATED_API NPY_API_VERSION |
#define PY_SSIZE_T_CLEAN |
typedef time_t NPY_TIME_T |
NPY_NO_EXPORT PyObject* array_datetime_as_string | ( | PyObject * | NPY_UNUSEDself, |
PyObject * | args, | ||
PyObject * | kwds | ||
) |
Referenced by _PyArray_SigintHandler().
static int convert_datetimestruct_local_to_utc | ( | npy_datetimestruct * | out_dts_utc, |
const npy_datetimestruct * | dts_local | ||
) | [static] |
References npy_datetimestruct::day, get_gmtime(), get_mktime(), npy_datetimestruct::hour, npy_datetimestruct::min, npy_datetimestruct::month, npy_datetimestruct::sec, and npy_datetimestruct::year.
static int convert_datetimestruct_utc_to_local | ( | npy_datetimestruct * | out_dts_local, |
const npy_datetimestruct * | dts_utc, | ||
int * | out_timezone_offset | ||
) | [static] |
Referenced by get_datetime_iso_8601_strlen().
NPY_NO_EXPORT int get_datetime_iso_8601_strlen | ( | int | local, |
NPY_DATETIMEUNIT | base | ||
) |
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
References convert_datetimestruct_utc_to_local().
static int get_gmtime | ( | NPY_TIME_T * | ts, |
struct tm * | tms | ||
) | [static] |
Referenced by convert_datetimestruct_local_to_utc().
static int get_localtime | ( | NPY_TIME_T * | ts, |
struct tm * | tms | ||
) | [static] |
Referenced by parse_iso_8601_datetime().
static NPY_TIME_T get_mktime | ( | struct tm * | tms | ) | [static] |
Referenced by convert_datetimestruct_local_to_utc().
static NPY_DATETIMEUNIT lossless_unit_from_datetimestruct | ( | npy_datetimestruct * | dts | ) | [static] |
NPY_NO_EXPORT int make_iso_8601_datetime | ( | npy_datetimestruct * | dts, |
char * | outstr, | ||
int | outlen, | ||
int | local, | ||
NPY_DATETIMEUNIT | base, | ||
int | tzoffset, | ||
NPY_CASTING | casting | ||
) |
NPY_NO_EXPORT int parse_iso_8601_datetime | ( | char * | str, |
Py_ssize_t | len, | ||
NPY_DATETIMEUNIT | unit, | ||
NPY_CASTING | casting, | ||
npy_datetimestruct * | out, | ||
npy_bool * | out_local, | ||
NPY_DATETIMEUNIT * | out_bestunit, | ||
npy_bool * | out_special | ||
) |
<blockquote> which will be used if it is.</blockquote>
<blockquote> to 0 otherwise. The values 'now' and 'today' don't get counted as local, and neither do UTC +/-#### timezone offsets, because they aren't using the computer's local timezone offset.</blockquote>
References _datetime_strings, can_cast_datetime64_units(), npy_datetimestruct::day, get_localtime(), npy_datetimestruct::month, npy_casting_to_string(), NPY_FR_D, and npy_datetimestruct::year.
Referenced by _strided_to_strided_datetime_general_cast().