/external/python/dateutil/dateutil/test/ |
D | test_tz.py | 10 from datetime import tzinfo 196 t0_u = datetime(2012, 3, 31, 15, 30, tzinfo=tz.tzutc()) # AEST 197 t1_u = datetime(2012, 3, 31, 16, 30, tzinfo=tz.tzutc()) # AEDT 202 self.assertEqual(t0_syd0.replace(tzinfo=None), 205 self.assertEqual(t1_syd1.replace(tzinfo=None), 218 t0_u = datetime(2012, 10, 6, 15, 30, tzinfo=tz.tzutc()) # AEST 219 t1_u = datetime(2012, 10, 6, 16, 30, tzinfo=tz.tzutc()) # AEDT 224 self.assertEqual(t0.replace(tzinfo=None), 227 self.assertEqual(t1.replace(tzinfo=None), 240 t0_u = datetime(2011, 11, 6, 5, 30, tzinfo=tz.tzutc()) [all …]
|
D | test_utils.py | 25 datetime(2014, 12, 15, 0, 0, 0, tzinfo=NYC)) 30 datetime(2014, 12, 16, 0, 0, 0, tzinfo=UTC)) 34 self.assertIs(utils.default_tzinfo(dt, NYC).tzinfo, 38 dt = datetime(2014, 9, 14, 9, 30, tzinfo=UTC) 39 self.assertIs(utils.default_tzinfo(dt, NYC).tzinfo,
|
D | test_parser.py | 153 tzinfo=self.brsttz)) 159 tzinfo=self.brsttz)) 165 tzinfo=self.brsttz)) 172 tzinfo=self.brsttz)) 226 tzinfo=self.brsttz)) 231 tzinfo=self.brsttz)) 236 tzinfo=self.brsttz)) 257 tzinfo=self.brsttz)) 262 tzinfo=self.brsttz)) 545 tzinfo=self.brsttz)) [all …]
|
/external/python/dateutil/dateutil/ |
D | utils.py | 7 def today(tzinfo=None): argument 19 dt = datetime.now(tzinfo) 20 return datetime.combine(dt.date(), time(0, tzinfo=tzinfo)) 23 def default_tzinfo(dt, tzinfo): argument 52 if dt.tzinfo is not None: 55 return dt.replace(tzinfo=tzinfo)
|
/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/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/pyasn1/tests/type/ |
D | test_useful.py | 23 class FixedOffset(datetime.tzinfo): 49 …neralizedTime.fromDateTime(datetime.datetime(2017, 7, 11, 0, 1, 2, 3000, tzinfo=UTC)) == '20170711… 55 …assert datetime.datetime(2017, 7, 11, 0, 1, 2, tzinfo=UTC) == useful.GeneralizedTime('201707110001… 58 …assert datetime.datetime(2017, 7, 11, 0, 1, 2, 3000, tzinfo=UTC) == useful.GeneralizedTime('201707… 61 …assert datetime.datetime(2017, 7, 11, 0, 1, 2, 3000, tzinfo=UTC) == useful.GeneralizedTime('201707… 64 …assert datetime.datetime(2017, 7, 11, 0, 1, 2, 3000, tzinfo=UTC) == useful.GeneralizedTime('201707… 67 …assert datetime.datetime(2017, 7, 11, 0, 1, 2, 3000, tzinfo=UTC2) == useful.GeneralizedTime('20170… 70 …assert datetime.datetime(2017, 7, 11, 0, 1, 2, 3000, tzinfo=UTC2) == useful.GeneralizedTime('20170… 104 …assert useful.UTCTime.fromDateTime(datetime.datetime(2017, 7, 11, 0, 1, 2, tzinfo=UTC)) == '170711… 110 …assert datetime.datetime(2017, 7, 11, 0, 1, 2, tzinfo=UTC) == useful.UTCTime('170711000102Z').asDa… [all …]
|
/external/python/cpython3/Lib/test/ |
D | datetimetester.py | 29 from datetime import tzinfo 109 class FixedOffset(tzinfo): 136 class _TZInfo(tzinfo): 152 useless = tzinfo() 159 class NotEnough(tzinfo): 163 self.assertTrue(issubclass(NotEnough, tzinfo)) 165 self.assertIsInstance(ne, tzinfo) 174 self.assertIsInstance(fo, tzinfo) 184 orig = tzinfo.__new__(tzinfo) 185 self.assertIs(type(orig), tzinfo) [all …]
|
/external/python/cpython3/Modules/ |
D | _datetimemodule.c | 106 ((PyDateTime_Time *)(p))->tzinfo : Py_None) 108 ((PyDateTime_DateTime *)(p))->tzinfo : Py_None) 884 int second, int usecond, PyObject *tzinfo, int fold, PyTypeObject *type) in new_datetime_ex2() argument 887 char aware = tzinfo != Py_None; in new_datetime_ex2() 895 if (check_tzinfo_subclass(tzinfo) < 0) { in new_datetime_ex2() 908 Py_INCREF(tzinfo); in new_datetime_ex2() 909 self->tzinfo = tzinfo; in new_datetime_ex2() 918 int second, int usecond, PyObject *tzinfo, PyTypeObject *type) in new_datetime_ex() argument 921 tzinfo, 0, type); in new_datetime_ex() 924 #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 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/dateutil/dateutil/tz/ |
D | _common.py | 5 from datetime import datetime, timedelta, tzinfo 120 args += (dt.microsecond, dt.tzinfo) 137 if dt.tzinfo is not self: 145 class _tzinfo(tzinfo): 165 dt = dt.replace(tzinfo=self) 171 same_dt = wall_0.replace(tzinfo=None) == wall_1.replace(tzinfo=None) 320 if dt.tzinfo is not self: 335 dt_utc = dt.replace(tzinfo=None) 367 dt = dt.replace(tzinfo=None) 381 dt = dt.replace(tzinfo=None) [all …]
|
D | tz.py | 37 class tzutc(datetime.tzinfo): 122 class tzoffset(datetime.tzinfo): 700 if dt.tzinfo is not self: 1113 dt = dt.replace(tzinfo=None) 1529 if dt.tzinfo is None: 1531 tz = dt.tzinfo 1533 dt = dt.replace(tzinfo=None) 1537 dt_rt = dt.replace(tzinfo=tz).astimezone(tzutc()).astimezone(tz) 1538 dt_rt = dt_rt.replace(tzinfo=None) 1564 if dt.tzinfo is None: [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/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) 97 t0 = datetime.datetime(1990, 1, 1, tzinfo = datetime.timezone.utc) 100 t2 = t2.replace(tzinfo = datetime.timezone(datetime.timedelta(hours=-5))) 106 t0 = datetime.datetime(1990, 1, 1, tzinfo = datetime.timezone.utc) 109 t2 = t2.replace(tzinfo = datetime.timezone(datetime.timedelta(hours=-5))) 116 t2 = utils.localtime(t0.replace(tzinfo=None)) 123 t2 = utils.localtime(t0.replace(tzinfo=None)) [all …]
|
/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/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 …]
|
/external/python/apitools/apitools/base/protorpclite/ |
D | message_types.py | 98 if value.tzinfo is None: 103 value.tzinfo.utcoffset(value)) 106 tz=value.tzinfo) 113 if value.tzinfo is not None: 114 utc_offset = value.tzinfo.utcoffset(value) 117 util.total_seconds(value.tzinfo.utcoffset(value)) / 60)
|
D | message_types_test.py | 54 datetime.datetime(2033, 2, 4, 11, 22, 10, tzinfo=time_zone)) 81 datetime.datetime(2033, 2, 4, 11, 6, 40, tzinfo=time_zone),
|
/external/python/cpython3/Lib/ |
D | datetime.py | 427 if tz is not None and not isinstance(tz, tzinfo): 1092 class tzinfo: class 1120 if dt.tzinfo is not self: 1160 _tzinfo_class = tzinfo 1187 def __new__(cls, hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold=0): argument 1215 _check_tzinfo_arg(tzinfo) 1221 self._tzinfo = tzinfo 1248 def tzinfo(self): member in time 1453 tzinfo=True, *, fold=None): argument 1463 if tzinfo is True: [all …]
|
/external/python/pyasn1/pyasn1/type/ |
D | useful.py | 41 class FixedOffset(datetime.tzinfo): 72 tzinfo = TimeMixIn.UTC 95 tzinfo = TimeMixIn.FixedOffset(minutes, '?') 98 tzinfo = None 126 return dt.replace(microsecond=ms, tzinfo=tzinfo)
|
/external/python/dateutil/docs/ |
D | examples.rst | 897 tzinfo=tzoffset('BRST', -10800)) 901 tzinfo=tzoffset('BRST', -10800)) 910 datetime.datetime(2003, 9, 25, 10, 36, 28, tzinfo=tzlocal()) 982 tzinfo=tzoffset(None, -10800)) 992 tzinfo=tzoffset(None, -10800)) 1019 tzinfo=tzoffset(None, -10800)) 1023 tzinfo=tzoffset(None, -10800)) 1167 tzinfo=tzoffset(None, -10800)) 1205 datetime.datetime(2003, 9, 27, 12, 40, 12, 156379, tzinfo=tzutc()) 1222 tzinfo=tzinfo=tzoffset('BRST', -10800)) [all …]
|
/external/python/cpython3/Lib/email/ |
D | utils.py | 164 if dt.tzinfo is None or dt.tzinfo != datetime.timezone.utc: 167 elif dt.tzinfo is None: 202 tzinfo=datetime.timezone(datetime.timedelta(seconds=tz))) 355 if dt.tzinfo is not None: 376 return dt.replace(tzinfo=tz)
|
/external/fonttools/Lib/fontTools/ufoLib/ |
D | utils.py | 18 from datetime import tzinfo, timedelta 22 class UTC(tzinfo):
|
/external/python/dateutil/dateutil/parser/ |
D | _parser.py | 1119 if isinstance(tzdata, datetime.tzinfo): 1120 tzinfo = tzdata 1122 tzinfo = tz.tzstr(tzdata) 1124 tzinfo = tz.tzoffset(tzname, tzdata) 1128 return tzinfo 1132 tzinfo = self._build_tzinfo(tzinfos, res.tzname, res.tzoffset) 1133 aware = naive.replace(tzinfo=tzinfo) 1137 aware = naive.replace(tzinfo=tz.tzlocal()) 1145 aware = aware.replace(tzinfo=tz.tzutc()) 1148 aware = naive.replace(tzinfo=tz.tzutc()) [all …]
|
/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())
|