/external/python/cpython2/Modules/ |
D | datetimemodule.c | 672 int second, int usecond, PyObject *tzinfo, PyTypeObject *type) in new_datetime_ex() argument 675 char aware = tzinfo != Py_None; in new_datetime_ex() 686 Py_INCREF(tzinfo); in new_datetime_ex() 687 self->tzinfo = tzinfo; in new_datetime_ex() 693 #define new_datetime(y, m, d, hh, mm, ss, us, tzinfo) \ argument 694 new_datetime_ex(y, m, d, hh, mm, ss, us, tzinfo, \ 700 PyObject *tzinfo, PyTypeObject *type) in new_time_ex() argument 703 char aware = tzinfo != Py_None; in new_time_ex() 714 Py_INCREF(tzinfo); in new_time_ex() 715 self->tzinfo = tzinfo; in new_time_ex() [all …]
|
/external/python/cpython3/Lib/test/ |
D | datetimetester.py | 28 from datetime import tzinfo 104 class FixedOffset(tzinfo): 131 class _TZInfo(tzinfo): 147 useless = tzinfo() 154 class NotEnough(tzinfo): 158 self.assertTrue(issubclass(NotEnough, tzinfo)) 160 self.assertIsInstance(ne, tzinfo) 169 self.assertIsInstance(fo, tzinfo) 179 orig = tzinfo.__new__(tzinfo) 180 self.assertIs(type(orig), tzinfo) [all …]
|
D | test_logging.py | 3212 class UTC(datetime.tzinfo):
|
/external/python/cpython2/Lib/test/ |
D | test_datetime.py | 15 from datetime import tzinfo 43 class FixedOffset(tzinfo): 71 useless = tzinfo() 78 class NotEnough(tzinfo): 82 self.assertTrue(issubclass(NotEnough, tzinfo)) 84 self.assertIsInstance(ne, tzinfo) 93 self.assertIsInstance(fo, tzinfo) 103 orig = tzinfo.__new__(tzinfo) 104 self.assertIs(type(orig), tzinfo) 108 self.assertIs(type(derived), tzinfo) [all …]
|
/external/python/cpython3/Modules/ |
D | _datetimemodule.c | 106 ((PyDateTime_Time *)(p))->tzinfo : Py_None) 108 ((PyDateTime_DateTime *)(p))->tzinfo : Py_None) 692 int second, int usecond, PyObject *tzinfo, int fold, PyTypeObject *type) in new_datetime_ex2() argument 695 char aware = tzinfo != Py_None; in new_datetime_ex2() 703 if (check_tzinfo_subclass(tzinfo) < 0) { in new_datetime_ex2() 716 Py_INCREF(tzinfo); in new_datetime_ex2() 717 self->tzinfo = tzinfo; in new_datetime_ex2() 726 int second, int usecond, PyObject *tzinfo, PyTypeObject *type) in new_datetime_ex() argument 729 tzinfo, 0, type); in new_datetime_ex() 732 #define new_datetime(y, m, d, hh, mm, ss, us, tzinfo, fold) \ argument [all …]
|
/external/python/cpython3/Doc/includes/ |
D | tzinfo-examples.py | 1 from datetime import tzinfo, timedelta, datetime, timezone 21 class LocalTimezone(tzinfo): 24 assert dt.tzinfo is self 25 stamp = (dt - datetime(1970, 1, 1, tzinfo=self)) // SECOND 31 tzinfo=self, fold=fold) 110 class USTimeZone(tzinfo): 131 if dt is None or dt.tzinfo is None: 137 assert dt.tzinfo is self 141 dt = dt.replace(tzinfo=None) 155 assert dt.tzinfo is self [all …]
|
/external/python/cpython2/Doc/library/ |
D | datetime.rst | 36 objects have an optional time zone information attribute, :attr:`!tzinfo`, that 37 can be set to an instance of a subclass of the abstract :class:`tzinfo` class. 38 These :class:`tzinfo` objects capture information about the offset from UTC 40 that no concrete :class:`tzinfo` classes are supplied by the :mod:`datetime` 86 and :attr:`.tzinfo`. 94 and :attr:`.tzinfo`. 104 .. class:: tzinfo 117 A :class:`.datetime` object *d* is aware if ``d.tzinfo`` is not ``None`` and 118 ``d.tzinfo.utcoffset(d)`` does not return ``None``. If ``d.tzinfo`` is 119 ``None``, or if ``d.tzinfo`` is not ``None`` but ``d.tzinfo.utcoffset(d)`` [all …]
|
/external/python/cpython3/Doc/library/ |
D | datetime.rst | 39 objects have an optional time zone information attribute, :attr:`!tzinfo`, that 40 can be set to an instance of a subclass of the abstract :class:`tzinfo` class. 41 These :class:`tzinfo` objects capture information about the offset from UTC 43 that only one concrete :class:`tzinfo` class, the :class:`timezone` class, is 91 and :attr:`.tzinfo`. 99 and :attr:`.tzinfo`. 109 .. class:: tzinfo 120 A class that implements the :class:`tzinfo` abstract base class as a 131 A :class:`.datetime` object *d* is aware if ``d.tzinfo`` is not ``None`` and 132 ``d.tzinfo.utcoffset(d)`` does not return ``None``. If ``d.tzinfo`` is [all …]
|
D | email.util.rst | 20 is, ``dt.tzinfo`` is ``None``), it is assumed to be in local time. In this 133 corresponding a :class:`~datetime.timezone` :class:`~datetime.tzinfo`.
|
/external/python/cpython3/Lib/test/test_email/ |
D | test_utils.py | 17 aware_dt = datetime.datetime(*dateargs, tzinfo=tz) 29 tzinfo=datetime.timezone.utc) 57 self.assertIsNotNone(t.tzinfo) 62 self.assertIsNotNone(t.tzinfo) 95 t0 = datetime.datetime(1990, 1, 1, tzinfo = datetime.timezone.utc) 98 t2 = t2.replace(tzinfo = datetime.timezone(datetime.timedelta(hours=-5))) 104 t0 = datetime.datetime(1990, 1, 1, tzinfo = datetime.timezone.utc) 107 t2 = t2.replace(tzinfo = datetime.timezone(datetime.timedelta(hours=-5))) 114 t2 = utils.localtime(t0.replace(tzinfo=None)) 121 t2 = utils.localtime(t0.replace(tzinfo=None)) [all …]
|
D | test_headerregistry.py | 174 dt = datetime.datetime(2001, 9, 23, 20, 10, 55, tzinfo=tz)
|
/external/python/cpython2/Doc/includes/ |
D | tzinfo-examples.py | 1 from datetime import tzinfo, timedelta, datetime 8 class UTC(tzinfo): 26 class FixedOffset(tzinfo): 54 class LocalTimezone(tzinfo): 116 class USTimeZone(tzinfo): 137 if dt is None or dt.tzinfo is None: 143 assert dt.tzinfo is self 161 if start <= dt.replace(tzinfo=None) < end:
|
/external/python/cpython3/Lib/ |
D | datetime.py | 309 if tz is not None and not isinstance(tz, tzinfo): 953 class tzinfo: class 981 if dt.tzinfo is not self: 1021 _tzinfo_class = tzinfo 1048 def __new__(cls, hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold=0): argument 1066 _check_tzinfo_arg(tzinfo) 1072 self._tzinfo = tzinfo 1099 def tzinfo(self): member in time 1304 tzinfo=True, *, fold=None): argument 1314 if tzinfo is True: [all …]
|
D | imaplib.py | 1488 dt = datetime(*date_time[:6], tzinfo=timezone(delta)) 1490 if date_time.tzinfo is None:
|
/external/python/cpython3/Lib/email/ |
D | utils.py | 176 if dt.tzinfo is None or dt.tzinfo != datetime.timezone.utc: 179 elif dt.tzinfo is None: 214 tzinfo=datetime.timezone(datetime.timedelta(seconds=tz))) 361 if dt.tzinfo is not None: 382 return dt.replace(tzinfo=tz)
|
/external/autotest/client/common_lib/ |
D | time_utils.py | 118 epoch = datetime.datetime(1970, 1, 1, tzinfo=pytz.utc) 119 local_datetime = datetime_val.replace(tzinfo=tzlocal.get_localzone())
|
/external/curl/lib/ |
D | parsedate.c | 94 struct tzinfo { struct 120 static const struct tzinfo tz[]= { 244 const struct tzinfo *what; in checktz()
|
/external/python/cpython2/Include/ |
D | datetime.h | 84 PyObject *tzinfo; member 111 PyObject *tzinfo; member
|
/external/python/cpython3/Include/ |
D | datetime.h | 85 PyObject *tzinfo; member 113 PyObject *tzinfo; member
|
/external/python/cpython3/Mac/Tools/ |
D | plistlib_generate_testdata.py | 31 …seconds = datetime.datetime(2004, 10, 26, 10, 33, 33, tzinfo=datetime.timezone(datetime.timedelta(…
|
/external/python/cpython3/Doc/whatsnew/ |
D | 3.2.rst | 984 implements the :class:`~datetime.tzinfo` interface by returning a fixed UTC 991 datetime.datetime(2010, 12, 8, 21, 4, 2, 923754, tzinfo=datetime.timezone.utc) 994 datetime.datetime(2000, 1, 1, 12, 0, tzinfo=datetime.timezone.utc)
|
D | 3.6.rst | 480 >>> u0 = datetime(2016, 11, 6, 4, tzinfo=timezone.utc) 992 accepts an optional *tzinfo* argument.
|
/external/python/cpython2/Misc/ |
D | HISTORY | 4638 time class. Previously, a datetimetz object with tzinfo=None acted 4649 as 0 instead, but a tzinfo subclass wishing to participate in 4654 The tzinfo methods utcoffset() and dst() must return a timedelta object 4659 The example tzinfo class for local time had a bug. It was replaced 4664 zones (a single tzinfo subclass modeling both standard and daylight 4670 datetime objects. If you merely want to attach, or remove, a tzinfo 4672 dt.replace(tzinfo=whatever) instead, where "whatever" is None or a 4673 tzinfo subclass instance. 4675 A new method tzinfo.fromutc(dt) can be overridden in tzinfo subclasses 4678 as its last step, so a tzinfo subclass can affect that too by overriding [all …]
|
/external/python/cpython3/Misc/ |
D | HISTORY | 365 - Issue #23600: Default implementation of tzinfo.fromutc() was returning 14213 aware ``datetime`` object is returned with ``tzinfo`` bound to a 14219 implementing ``datetime.tzinfo`` interface. Instances of the new class, 22022 time class. Previously, a datetimetz object with tzinfo=None acted 22033 as 0 instead, but a tzinfo subclass wishing to participate in 22038 The tzinfo methods utcoffset() and dst() must return a timedelta object 22043 The example tzinfo class for local time had a bug. It was replaced 22048 zones (a single tzinfo subclass modeling both standard and daylight 22054 datetime objects. If you merely want to attach, or remove, a tzinfo 22056 dt.replace(tzinfo=whatever) instead, where "whatever" is None or a [all …]
|
/external/python/cpython2/Doc/whatsnew/ |
D | 2.3.rst | 1690 the abstract :class:`tzinfo` class.
|