Home
last modified time | relevance | path

Searched refs:timedelta (Results 1 – 25 of 199) sorted by relevance

12345678

/external/python/dateutil/dateutil/test/
Dtest_tz.py8 from datetime import datetime, timedelta
157 EST_TUPLE = ('EST', timedelta(hours=-5), timedelta(hours=0))
158 EDT_TUPLE = ('EDT', timedelta(hours=-4), timedelta(hours=1))
213 self.assertEqual(t0_syd0.utcoffset(), timedelta(hours=11))
214 self.assertEqual(t1_syd1.utcoffset(), timedelta(hours=10))
235 self.assertEqual(t0.utcoffset(), timedelta(hours=10))
236 self.assertEqual(t1.utcoffset(), timedelta(hours=11))
258 self.assertEqual(t0_tor.utcoffset(), timedelta(hours=-4.0))
259 self.assertEqual(t1_tor.utcoffset(), timedelta(hours=-5.0))
281 self.assertEqual(t0.utcoffset(), timedelta(hours=-5.0))
[all …]
Dtest_utils.py3 from datetime import timedelta, datetime
46 self.assertTrue(within_delta(d1, d2, timedelta(seconds=1)))
47 self.assertFalse(within_delta(d1, d2, timedelta(microseconds=1)))
53 self.assertTrue(within_delta(d2, d1, timedelta(days=-1)))
/external/python/cpython2/Lib/test/
Dtest_datetime.py14 from datetime import timedelta
46 offset = timedelta(minutes=offset)
48 dstoffset = timedelta(minutes=dstoffset)
95 self.assertEqual(fo.utcoffset(dt), timedelta(minutes=3))
97 self.assertEqual(fo.dst(dt), timedelta(minutes=42))
112 offset = timedelta(minutes=-300)
168 theclass = timedelta
172 td = timedelta
197 td = timedelta
242 a = timedelta(42)
[all …]
/external/python/cpython3/Lib/test/
Ddatetimetester.py27 from datetime import timedelta
119 offset = timedelta(minutes=offset)
121 dstoffset = timedelta(minutes=dstoffset)
182 self.assertEqual(fo.utcoffset(dt), timedelta(minutes=3))
184 self.assertEqual(fo.dst(dt), timedelta(minutes=42))
199 offset = timedelta(minutes=-300)
219 DSTDIFF = DSTOFFSET = timedelta(hours=1)
244 self.ACDT = timezone(timedelta(hours=9.5), 'ACDT')
245 self.EST = timezone(-timedelta(hours=5), 'EST')
262 limit = timedelta(hours=23, minutes=59)
[all …]
/external/python/cpython3/Lib/
Ddatetime.py189 hh, mm = divmod(off, timedelta(hours=1))
190 mm, ss = divmod(mm, timedelta(minutes=1))
232 h, rest = divmod(offset, timedelta(hours=1))
233 m, rest = divmod(rest, timedelta(minutes=1))
349 td = timedelta(hours=tz_comps[0], minutes=tz_comps[1],
375 if not isinstance(offset, timedelta):
378 if not -timedelta(1) < offset < timedelta(1):
473 class timedelta: class
641 if isinstance(other, timedelta):
644 return timedelta(self._days + other._days,
[all …]
/external/rust/crates/grpcio-sys/grpc/tools/run_tests/xds_k8s_test_driver/framework/helpers/
Dretryers.py29 timedelta = datetime.timedelta variable
45 wait_min: timedelta, argument
46 wait_max: timedelta, argument
47 timeout: timedelta, argument
/external/python/asn1crypto/tests/
Dtest_util.py7 from datetime import date, datetime, time, timedelta
83 delta_plus_5_42 = timedelta(hours=5, minutes=42)
97 util.timezone(timedelta(hours=5, minutes=42, seconds=13))
100 util.timezone(timedelta(hours=5, minutes=42, microseconds=13))
116 self.assertEqual('UTC', util.timezone(timedelta(0)).tzname(None))
122 self.assertTrue(util.timezone(delta_minus_5_42).dst(None) in set((timedelta(0), None)))
125 …self.assertTrue(util.create_timezone(delta_plus_5_42) is util.create_timezone(timedelta(hours=5, m…
150 zone = util.create_timezone(timedelta(hours=12, minutes=45))
188 zone = util.create_timezone(timedelta(hours=12, minutes=45))
201 zone = util.create_timezone(timedelta(hours=12, minutes=45))
[all …]
/external/python/cpython2/Doc/includes/
Dtzinfo-examples.py1 from datetime import tzinfo, timedelta, datetime
3 ZERO = timedelta(0)
4 HOUR = timedelta(hours=1)
30 self.__offset = timedelta(minutes = offset)
46 STDOFFSET = timedelta(seconds = -_time.timezone)
48 DSTOFFSET = timedelta(seconds = -_time.altzone)
87 dt += timedelta(days_to_go)
119 self.stdoffset = timedelta(hours=hours)
/external/python/cpython3/Doc/includes/
Dtzinfo_examples.py1 from datetime import tzinfo, timedelta, datetime
3 ZERO = timedelta(0)
4 HOUR = timedelta(hours=1)
5 SECOND = timedelta(seconds=1)
13 STDOFFSET = timedelta(seconds = -_time.timezone)
15 DSTOFFSET = timedelta(seconds = -_time.altzone)
64 dt += timedelta(days_to_go)
113 self.stdoffset = timedelta(hours=hours)
/external/python/cpython3/Lib/test/test_zoneinfo/
Dtest_zoneinfo.py17 from datetime import date, datetime, time, timedelta, timezone
40 ZERO = timedelta(0)
41 ONE_H = timedelta(hours=1)
286 zone_transition.transition - timedelta(days=2),
294 zone_transition.transition + timedelta(days=2),
325 dt = zt.anomaly_start - timedelta(seconds=1)
333 dt = zt.anomaly_start + timedelta(seconds=1)
337 dt = zt.anomaly_end - timedelta(seconds=1)
345 dt = zt.anomaly_end + timedelta(seconds=1)
372 dt_before_utc = dt_utc - timedelta(seconds=1)
[all …]
/external/python/cpython2/Doc/library/
Ddatetime.rst97 .. class:: timedelta
124 The distinction between naive and aware doesn't apply to :class:`timedelta`
130 timedelta
137 .. _datetime-timedelta:
139 :class:`timedelta` Objects
142 A :class:`timedelta` object represents a duration, the difference between two
145 .. class:: timedelta([days[, seconds[, microseconds[, milliseconds[, minutes[, hours[, weeks]]]]]]])
176 >>> from datetime import timedelta
177 >>> d = timedelta(microseconds=-1)
184 .. attribute:: timedelta.min
[all …]
/external/autotest/site_utils/
Dcount_jobs_unittest.py11 from datetime import timedelta, datetime
42 count_jobs.number_of_jobs_since(timedelta(days=999)))
59 models.Job(created_on=some_day - timedelta(hours=i)).save()
63 count_jobs.number_of_jobs_since(timedelta(days=days)))
Dcount_jobs.py10 from datetime import datetime, timedelta
38 count = number_of_jobs_since(timedelta(days=1))
/external/python/cryptography/tests/x509/
Dtest_ocsp.py68 datetime.datetime.now() + datetime.timedelta(days=3650)
287 time, time, time - datetime.timedelta(days=36500), None
335 this_update = current_time - datetime.timedelta(days=1)
336 next_update = this_update + datetime.timedelta(days=7)
349 this_update = current_time - datetime.timedelta(days=1)
350 next_update = this_update + datetime.timedelta(days=7)
365 this_update = current_time - datetime.timedelta(days=1)
366 next_update = this_update + datetime.timedelta(days=7)
393 this_update = current_time - datetime.timedelta(days=1)
394 next_update = this_update + datetime.timedelta(days=7)
[all …]
/external/python/pybind11/tests/
Dtest_chrono.py139 assert isinstance(diff, datetime.timedelta)
176 assert isinstance(time1, datetime.timedelta)
180 time1 = datetime.timedelta(days=10, seconds=10, microseconds=100)
183 assert isinstance(time2, datetime.timedelta)
195 assert isinstance(time, datetime.timedelta)
207 time1 = m.test_nano_timepoint(time, datetime.timedelta(seconds=60))
208 assert time1 == time + datetime.timedelta(seconds=60)
/external/python/cpython3/Doc/library/
Ddatetime.rst112 .. class:: timedelta
140 timedelta
179 The distinction between aware and naive doesn't apply to :class:`timedelta`
182 .. _datetime-timedelta:
184 :class:`timedelta` Objects
187 A :class:`timedelta` object represents a duration, the difference between two
190 .. class:: timedelta(days=0, seconds=0, microseconds=0, milliseconds=0, minutes=0, hours=0, weeks=0)
214 >>> from datetime import timedelta
215 >>> delta = timedelta(
226 datetime.timedelta(days=64, seconds=29156, microseconds=10)
[all …]
/external/python/asn1crypto/asn1crypto/
Dutil.py23 from datetime import datetime, date, timedelta, tzinfo
134 if not timedelta(hours=-24) < offset < timedelta(hours=24):
205 return timedelta(0)
207 timezone.utc = timezone(timedelta(0))
283 return timedelta(0)
286 return timedelta(0)
793 zero = timedelta(0)
837 if isinstance(other, timedelta):
844 return self._y2k - other - timedelta(days=self.DAYS_IN_2000_YEARS)
/external/autotest/utils/
Dsite_check_dut_usage.py86 total_run_time = datetime.timedelta()
87 total_queued_time = datetime.timedelta()
117 print 'Average Job Time ', datetime.timedelta(seconds=int(
119 print 'Average Time Job Queued ', datetime.timedelta(seconds=int(
/external/python/pybind11/docs/advanced/cast/
Dchrono.rst40 it is a different clock they will be timedelta objects.
52 - ``std::chrono::duration`` → ``datetime.timedelta``
56 - ``std::chrono::[other_clocks]::time_point`` → ``datetime.timedelta``
58 This timedelta measures the time from the clocks epoch to now.
67 - ``datetime.timedelta`` → ``std::chrono::duration``
70 - ``datetime.timedelta`` → ``std::chrono::[other_clocks]::time_point``
/external/python/dateutil/dateutil/parser/
Disoparser.py10 from datetime import datetime, timedelta, time, date
144 return datetime(*components) + timedelta(days=1)
292 base_date = date(year, 1, 1) + timedelta(days=ordinal_day - 1)
324 week_1 = jan_4 - timedelta(days=jan_4.isocalendar()[2] - 1)
328 return week_1 + timedelta(days=week_offset)
/external/python/cpython3/Lib/test/test_email/
Dtest_utils.py14 utcoffset = datetime.timedelta(hours=-7)
99 t2 = t0 - datetime.timedelta(hours=5)
100 t2 = t2.replace(tzinfo = datetime.timezone(datetime.timedelta(hours=-5)))
108 t2 = t0 - datetime.timedelta(hours=5)
109 t2 = t2.replace(tzinfo = datetime.timezone(datetime.timedelta(hours=-5)))
/external/grpc-grpc/tools/failures/
Ddetect_new_failures.py189 a_week_ago = today - datetime.timedelta(days=7)
241 datetime.date.today() - datetime.timedelta(days=args.calibration_days) -
242 datetime.timedelta(days=args.reporting_days))
243 calibration_end = calibration_begin + datetime.timedelta(
246 reporting_end = reporting_begin + datetime.timedelta(
/external/python/apitools/apitools/base/protorpclite/
Dutil.py215 if isinstance(offset, datetime.timedelta):
225 return datetime.timedelta(minutes=self.__offset)
238 return datetime.timedelta(0)
/external/python/dateutil/dateutil/tz/
Dwin.py27 ONEWEEK = datetime.timedelta(7)
232 self._std_offset = datetime.timedelta(minutes=stdoffset)
233 self._dst_offset = datetime.timedelta(minutes=dstoffset)
296 self._std_offset = datetime.timedelta(minutes=stdoffset)
297 self._dst_offset = datetime.timedelta(minutes=dstoffset)
Dtz.py36 ZERO = datetime.timedelta(0)
146 self._offset = datetime.timedelta(seconds=_get_supported_offset(offset))
202 self._std_offset = datetime.timedelta(seconds=-time.timezone)
204 self._dst_offset = datetime.timedelta(seconds=-time.altzone)
612 tti.dstoffset = datetime.timedelta(0)
613 tti.delta = datetime.timedelta(seconds=gmtoff)
679 tti.dstoffset = datetime.timedelta(seconds=dstoffset)
767 dt_out = dt + datetime.timedelta(seconds=tti.offset)
964 self._std_offset = datetime.timedelta(seconds=stdoffset)
969 self._dst_offset = datetime.timedelta(seconds=dstoffset)
[all …]

12345678