mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
bpo-30155: Add macros to get tzinfo from datetime instances (GH-21633)
Add PyDateTime_DATE_GET_TZINFO() and PyDateTime_TIME_GET_TZINFO() macros.
This commit is contained in:
parent
9c4eac7f02
commit
2e4dd336e5
8 changed files with 46 additions and 17 deletions
|
|
@ -185,6 +185,11 @@ must not be ``NULL``, and the type is not checked:
|
|||
|
||||
Return the microsecond, as an int from 0 through 999999.
|
||||
|
||||
.. c:function:: PyObject* PyDateTime_DATE_GET_TZINFO(PyDateTime_DateTime *o)
|
||||
|
||||
Return the tzinfo (which may be ``None``).
|
||||
|
||||
.. versionadded:: 3.10
|
||||
|
||||
Macros to extract fields from time objects. The argument must be an instance of
|
||||
:c:data:`PyDateTime_Time`, including subclasses. The argument must not be ``NULL``,
|
||||
|
|
@ -209,6 +214,12 @@ and the type is not checked:
|
|||
|
||||
Return the microsecond, as an int from 0 through 999999.
|
||||
|
||||
.. c:function:: PyObject* PyDateTime_TIME_GET_TZINFO(PyDateTime_Time *o)
|
||||
|
||||
Return the tzinfo (which may be ``None``).
|
||||
|
||||
.. versionadded:: 3.10
|
||||
|
||||
|
||||
Macros to extract fields from time delta objects. The argument must be an
|
||||
instance of :c:data:`PyDateTime_Delta`, including subclasses. The argument must
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue