Home
last modified time | relevance | path

Searched refs:tzinfo (Results 1 – 25 of 46) sorted by relevance

12

/third_party/python/Doc/includes/
Dtzinfo_examples.py1 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 …]
/third_party/python/Lib/test/
Ddatetimetester.py28 from datetime import tzinfo
115 class FixedOffset(tzinfo):
142 class _TZInfo(tzinfo):
158 useless = tzinfo()
165 class NotEnough(tzinfo):
169 self.assertTrue(issubclass(NotEnough, tzinfo))
171 self.assertIsInstance(ne, tzinfo)
180 self.assertIsInstance(fo, tzinfo)
190 orig = tzinfo.__new__(tzinfo)
191 self.assertIs(type(orig), tzinfo)
[all …]
/third_party/python/Modules/
D_datetimemodule.c892 int second, int usecond, PyObject *tzinfo, int fold, PyTypeObject *type) in new_datetime_ex2() argument
895 char aware = tzinfo != Py_None; in new_datetime_ex2()
903 if (check_tzinfo_subclass(tzinfo) < 0) { in new_datetime_ex2()
916 Py_INCREF(tzinfo); in new_datetime_ex2()
917 self->tzinfo = tzinfo; in new_datetime_ex2()
926 int second, int usecond, PyObject *tzinfo, PyTypeObject *type) in new_datetime_ex() argument
929 tzinfo, 0, type); in new_datetime_ex()
932 #define new_datetime(y, m, d, hh, mm, ss, us, tzinfo, fold) \ argument
933 new_datetime_ex2(y, m, d, hh, mm, ss, us, tzinfo, fold, \
938 int second, int usecond, PyObject *tzinfo, in new_datetime_subclass_fold_ex() argument
[all …]
Dtimemodule.c1728 TIME_ZONE_INFORMATION tzinfo = {0}; local
1729 GetTimeZoneInformation(&tzinfo);
1730 otz0 = PyUnicode_FromWideChar(tzinfo.StandardName, -1);
1734 otz1 = PyUnicode_FromWideChar(tzinfo.DaylightName, -1);
/third_party/python/Lib/test/test_email/
Dtest_utils.py17 aware_dt = datetime.datetime(*dateargs, tzinfo=tz)
29 tzinfo=datetime.timezone.utc)
67 self.assertIsNotNone(t.tzinfo)
72 self.assertIsNotNone(t.tzinfo)
107 t0 = datetime.datetime(1990, 1, 1, tzinfo = datetime.timezone.utc)
110 t2 = t2.replace(tzinfo = datetime.timezone(datetime.timedelta(hours=-5)))
116 t0 = datetime.datetime(1990, 1, 1, tzinfo = datetime.timezone.utc)
119 t2 = t2.replace(tzinfo = datetime.timezone(datetime.timedelta(hours=-5)))
126 t2 = utils.localtime(t0.replace(tzinfo=None))
133 t2 = utils.localtime(t0.replace(tzinfo=None))
[all …]
/third_party/python/Doc/library/
Ddatetime.rst58 objects have an optional time zone information attribute, :attr:`!tzinfo`, that
59 can be set to an instance of a subclass of the abstract :class:`tzinfo` class.
60 These :class:`tzinfo` objects capture information about the offset from UTC
63 Only one concrete :class:`tzinfo` class, the :class:`timezone` class, is
104 and :attr:`.tzinfo`.
112 and :attr:`.tzinfo`.
122 .. class:: tzinfo
133 A class that implements the :class:`tzinfo` abstract base class as a
144 tzinfo
170 1. ``d.tzinfo`` is not ``None``
[all …]
Dzoneinfo.rst34 :class:`ZoneInfo` is a concrete implementation of the :class:`datetime.tzinfo`
35 abstract base class, and is intended to be attached to ``tzinfo``, either via
42 >>> dt = datetime(2020, 10, 31, 12, tzinfo=ZoneInfo("America/Los_Angeles"))
66 >>> dt = datetime(2020, 11, 1, 1, tzinfo=ZoneInfo("America/Los_Angeles"))
78 >>> dt_utc = datetime(2020, 11, 1, 8, tzinfo=timezone.utc)
173 A concrete :class:`datetime.tzinfo` subclass that represents an IANA time
276 >>> dt = datetime(2020, 4, 1, 3, 15, tzinfo=zone)
277 >>> f"{dt.isoformat()} [{dt.tzinfo}]"
Demail.utils.rst20 is, ``dt.tzinfo`` is ``None``), it is assumed to be in local time. In this
135 corresponding a :class:`~datetime.timezone` :class:`~datetime.tzinfo`.
/third_party/python/Lib/
Ddatetime.py415 if tz is not None and not isinstance(tz, tzinfo):
1114 class tzinfo: class
1142 if dt.tzinfo is not self:
1212 _tzinfo_class = tzinfo
1239 def __new__(cls, hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold=0): argument
1267 _check_tzinfo_arg(tzinfo)
1273 self._tzinfo = tzinfo
1300 def tzinfo(self): member in time
1506 tzinfo=True, *, fold=None): argument
1516 if tzinfo is True:
[all …]
/third_party/python/Lib/email/
Dutils.py164 if dt.tzinfo is None or dt.tzinfo != datetime.timezone.utc:
167 elif dt.tzinfo is None:
205 tzinfo=datetime.timezone(datetime.timedelta(seconds=tz)))
350 if dt.tzinfo is not None:
371 return dt.replace(tzinfo=tz)
/third_party/python/Lib/test/test_zoneinfo/
Dtest_zoneinfo.py106 tzinfo=dt.tzinfo,
258 (datetime(2019, 1, 1, tzinfo=timezone.utc), ValueError),
273 dt = datetime(2020, 1, 1, tzinfo=zi)
302 dt = dt.replace(tzinfo=tzi)
357 dt = dt.replace(fold=fold, tzinfo=tzi)
385 t = time(11, 15, 1, 34471, tzinfo=zi)
396 t = time(11, 15, 1, 34471, tzinfo=zi)
433 tzinfo=dt.tzinfo,
442 example = zt.transition_utc.replace(tzinfo=zi)
560 dt0 = datetime(1883, 6, 9, 1, tzinfo=zi)
[all …]
/third_party/icu/docs/
DGemfile28 # Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
31 gem "tzinfo", "~> 1.2"
32 gem "tzinfo-data"
DGemfile.lock8 tzinfo (~> 1.1)
250 tzinfo (1.2.8)
266 tzinfo (~> 1.2)
267 tzinfo-data
/third_party/python/Include/
Ddatetime.h85 PyObject *tzinfo; member
113 PyObject *tzinfo; member
136 ((PyDateTime_DateTime *)(o))->tzinfo : Py_None)
148 ((PyDateTime_Time *)(o))->tzinfo : Py_None)
/third_party/curl/lib/
Dparsedate.c118 struct tzinfo { struct
126 static const struct tzinfo tz[]= { argument
251 const struct tzinfo *what; in checktz()
/third_party/PyYAML/lib/yaml/
Dconstructor.py335 tzinfo = None
347 tzinfo = datetime.timezone(delta)
349 tzinfo = datetime.timezone.utc
351 tzinfo=tzinfo)
/third_party/python/Misc/NEWS.d/
D3.7.0rc1.rst55 Datetime instance d with non-None tzinfo, but with d.tzinfo.utcoffset(d)
D3.6.6rc1.rst132 Datetime instance d with non-None tzinfo, but with d.tzinfo.utcoffset(d)
/third_party/python/Mac/Tools/
Dplistlib_generate_testdata.py32 …seconds = datetime.datetime(2004, 10, 26, 10, 33, 33, tzinfo=datetime.timezone(datetime.timedelta(…
/third_party/python/Lib/zoneinfo/
D_zoneinfo.py7 from datetime import datetime, timedelta, tzinfo
30 class ZoneInfo(tzinfo):
119 if dt.tzinfo is not self:
/third_party/PyYAML/tests/lib/
Dtest_constructor.py49 tz = dt.tzinfo.tzname(dt)
217 class FixedOffset(datetime.tzinfo):
/third_party/glib/glib/
Dgdate.c2233 TIME_ZONE_INFORMATION tzinfo; in win32_strftime_helper() local
2545 n = GetTimeZoneInformation (&tzinfo); in win32_strftime_helper()
2549 g_array_append_vals (result, tzinfo.StandardName, wcslen (tzinfo.StandardName)); in win32_strftime_helper()
2551 g_array_append_vals (result, tzinfo.DaylightName, wcslen (tzinfo.DaylightName)); in win32_strftime_helper()
Dgtimezone.c1992 TransitionInfo *tzinfo = &(TRANSITION_INFO(index)); in interval_info() local
1993 if (!tzinfo->is_dst) in interval_info()
1994 return tzinfo; in interval_info()
/third_party/python/Lib/http/
Dserver.py730 if ims.tzinfo is None:
733 ims = ims.replace(tzinfo=datetime.timezone.utc)
734 if ims.tzinfo is datetime.timezone.utc:
/third_party/python/Doc/c-api/
Ddatetime.rst195 Return the tzinfo (which may be ``None``).
224 Return the tzinfo (which may be ``None``).

12