Searched refs:timedelta (Results 1 – 25 of 199) sorted by relevance
12345678
8 from datetime import datetime, timedelta157 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 …]
3 from datetime import timedelta, datetime46 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)))
14 from datetime import timedelta46 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 = timedelta172 td = timedelta197 td = timedelta242 a = timedelta(42)[all …]
27 from datetime import timedelta119 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 …]
189 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: class641 if isinstance(other, timedelta):644 return timedelta(self._days + other._days,[all …]
29 timedelta = datetime.timedelta variable45 wait_min: timedelta, argument46 wait_max: timedelta, argument47 timeout: timedelta, argument
7 from datetime import date, datetime, time, timedelta83 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 …]
1 from datetime import tzinfo, timedelta, datetime3 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)
1 from datetime import tzinfo, timedelta, datetime3 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)
17 from datetime import date, datetime, time, timedelta, timezone40 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 …]
97 .. class:: timedelta124 The distinction between naive and aware doesn't apply to :class:`timedelta`130 timedelta137 .. _datetime-timedelta:139 :class:`timedelta` Objects142 A :class:`timedelta` object represents a duration, the difference between two145 .. class:: timedelta([days[, seconds[, microseconds[, milliseconds[, minutes[, hours[, weeks]]]]]]])176 >>> from datetime import timedelta177 >>> d = timedelta(microseconds=-1)184 .. attribute:: timedelta.min[all …]
11 from datetime import timedelta, datetime42 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)))
10 from datetime import datetime, timedelta38 count = number_of_jobs_since(timedelta(days=1))
68 datetime.datetime.now() + datetime.timedelta(days=3650)287 time, time, time - datetime.timedelta(days=36500), None335 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 …]
139 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)
112 .. class:: timedelta140 timedelta179 The distinction between aware and naive doesn't apply to :class:`timedelta`182 .. _datetime-timedelta:184 :class:`timedelta` Objects187 A :class:`timedelta` object represents a duration, the difference between two190 .. class:: timedelta(days=0, seconds=0, microseconds=0, milliseconds=0, minutes=0, hours=0, weeks=0)214 >>> from datetime import timedelta215 >>> delta = timedelta(226 datetime.timedelta(days=64, seconds=29156, microseconds=10)[all …]
23 from datetime import datetime, date, timedelta, tzinfo134 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)
86 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(
40 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``
10 from datetime import datetime, timedelta, time, date144 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)
14 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)))
189 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(
215 if isinstance(offset, datetime.timedelta):225 return datetime.timedelta(minutes=self.__offset)238 return datetime.timedelta(0)
27 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)
36 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 …]