Home
last modified time | relevance | path

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

1234567891011

/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.py190 hh, mm = divmod(off, timedelta(hours=1))
191 mm, ss = divmod(mm, timedelta(minutes=1))
233 h, rest = divmod(offset, timedelta(hours=1))
234 m, rest = divmod(rest, timedelta(minutes=1))
350 td = timedelta(hours=tz_comps[0], minutes=tz_comps[1],
376 if not isinstance(offset, timedelta):
379 if not -timedelta(1) < offset < timedelta(1):
442 class timedelta: class
610 if isinstance(other, timedelta):
613 return timedelta(self._days + other._days,
[all …]
/external/rust/crates/grpcio-sys/grpc/tools/run_tests/xds_k8s_test_driver/framework/helpers/
Dretryers.py31 timedelta = datetime.timedelta variable
53 wait_min: timedelta, argument
54 wait_max: timedelta, argument
55 timeout: timedelta, argument
71 wait_fixed: timedelta, argument
73 timeout: timedelta = None, 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/curl/tests/http/testenv/
Dcerts.py29 from datetime import timedelta, datetime
79 valid_from: timedelta = timedelta(days=-1), argument
80 valid_to: timedelta = timedelta(days=89), argument
335 valid_from: timedelta = timedelta(days=-1), argument
336 valid_to: timedelta = timedelta(days=89), argument
374 valid_from_delta: timedelta = None, argument
375 valid_until_delta: timedelta = None argument
474 valid_from: timedelta = timedelta(days=-1), argument
475 valid_to: timedelta = timedelta(days=89), argument
497 valid_from: timedelta = timedelta(days=-1), argument
[all …]
Dnghttpx.py33 from datetime import datetime, timedelta
99 return not wait_live or self.wait_live(timeout=timedelta(seconds=5))
112 return not wait_dead or self.wait_dead(timeout=timedelta(seconds=5))
119 def reload(self, timeout: timedelta): argument
142 return self.wait_live(timeout=timedelta(seconds=5))
145 def wait_dead(self, timeout: timedelta): argument
158 def wait_live(self, timeout: timedelta): argument
Dcaddy.py31 from datetime import timedelta, datetime
88 return not wait_live or self.wait_live(timeout=timedelta(seconds=5))
101 return not wait_dead or self.wait_dead(timeout=timedelta(seconds=5))
108 def wait_dead(self, timeout: timedelta): argument
121 def wait_live(self, timeout: timedelta): argument
/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/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/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/python/cryptography/tests/x509/
Dtest_ocsp.py68 datetime.datetime.now() + datetime.timedelta(days=3650)
359 time - datetime.timedelta(days=36500),
408 this_update = current_time - datetime.timedelta(days=1)
409 next_update = this_update + datetime.timedelta(days=7)
428 this_update = current_time - datetime.timedelta(days=1)
429 next_update = this_update + datetime.timedelta(days=7)
450 this_update = current_time - datetime.timedelta(days=1)
451 next_update = this_update + datetime.timedelta(days=7)
486 this_update = current_time - datetime.timedelta(days=1)
487 next_update = this_update + datetime.timedelta(days=7)
[all …]
/external/python/cpython3/Doc/library/
Ddatetime.rst115 .. class:: timedelta
143 timedelta
182 The distinction between aware and naive doesn't apply to :class:`timedelta`
185 .. _datetime-timedelta:
187 :class:`timedelta` Objects
190 A :class:`timedelta` object represents a duration, the difference between two
193 .. class:: timedelta(days=0, seconds=0, microseconds=0, milliseconds=0, minutes=0, hours=0, weeks=0)
217 >>> from datetime import timedelta
218 >>> delta = timedelta(
229 datetime.timedelta(days=64, seconds=29156, microseconds=10)
[all …]
/external/autotest/site_utils/
Dcount_jobs_unittest.py11 from datetime import timedelta, datetime
41 count_jobs.number_of_jobs_since(timedelta(days=999)))
58 models.Job(created_on=some_day - timedelta(hours=i)).save()
62 count_jobs.number_of_jobs_since(timedelta(days=days)))
/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/google-auth-library-python/tests/
Dtest_impersonated_credentials.py61 _helpers.utcnow() + datetime.timedelta(seconds=500),
166 _helpers.utcnow().replace(microsecond=0) + datetime.timedelta(seconds=500)
191 _helpers.utcnow().replace(microsecond=0) + datetime.timedelta(seconds=500)
219 + datetime.timedelta(seconds=time_skew)
228 + datetime.timedelta(seconds=500)
251 expire_time = (_helpers.utcnow() + datetime.timedelta(seconds=500)).isoformat(
329 _helpers.utcnow().replace(microsecond=0) + datetime.timedelta(seconds=500)
379 _helpers.utcnow().replace(microsecond=0) + datetime.timedelta(seconds=500)
405 _helpers.utcnow().replace(microsecond=0) + datetime.timedelta(seconds=500)
434 _helpers.utcnow().replace(microsecond=0) + datetime.timedelta(seconds=500)
[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/curl/tests/http/
Dtest_03_goaway.py29 from datetime import timedelta
80 assert r.duration >= timedelta(seconds=count)
101 assert nghttpx.reload(timeout=timedelta(seconds=2))
112 assert r.duration >= timedelta(seconds=count)
145 assert r.duration >= timedelta(seconds=count)
/external/autotest/utils/
Dsite_check_dut_usage.py90 total_run_time = datetime.timedelta()
91 total_queued_time = datetime.timedelta()
121 print('Average Job Time ', datetime.timedelta(seconds=int(
123 print('Average Time Job Queued ', datetime.timedelta(seconds=int(
/external/python/google-auth-library-python/tests/transport/
Dtest_requests.py61 frozen_time.tick(delta=datetime.timedelta(seconds=3.8))
66 frozen_time.tick(delta=datetime.timedelta(seconds=3.8))
71 frozen_time.tick(delta=datetime.timedelta(days=3650))
78 frozen_time.tick(delta=datetime.timedelta(seconds=10.001))
84 frozen_time.tick(delta=datetime.timedelta(seconds=10.001))
93 frozen_time.tick(delta=datetime.timedelta(seconds=2))
278 frozen_time.tick, delta=datetime.timedelta(seconds=1.0)
298 frozen_time.tick, delta=datetime.timedelta(seconds=1.0)
322 frozen_time.tick, delta=datetime.timedelta(seconds=1.0)
349 frozen_time.tick, delta=datetime.timedelta(seconds=1.0)
/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)

1234567891011