• Home
  • Raw
  • Download

Lines Matching refs:timedelta

7 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))
223 zone = util.create_timezone(timedelta(hours=12, minutes=45))
289 … util.extended_datetime(0, 12, 31, 21, 4, 5, 6, util.create_timezone(timedelta(hours=-8)))
293 … util.extended_datetime(0, 12, 31, 21, 4, 5, 6, util.create_timezone(timedelta(hours=-8)))
294 == datetime(1, 1, 1, 5, 7, 5, 6, util.create_timezone(timedelta(hours=0, minutes=3)))
297 … util.extended_datetime(0, 12, 31, 21, 4, 5, 6, util.create_timezone(timedelta(hours=-7)))
307 zone = util.create_timezone(timedelta(hours=12, minutes=45))
309 self.assertEqual(ext_dt + timedelta(hours=20), datetime(1, 1, 1, 5, 17, 45, 14889, zone))
310 …self.assertEqual(ext_dt - timedelta(hours=20), util.extended_datetime(0, 12, 30, 13, 17, 45, 14889…
311 self.assertEqual(ext_dt - ext_dt, timedelta(0))
313 zone2 = util.create_timezone(timedelta(hours=-8, minutes=-31))
315 expected_diff = timedelta(days=47, hours=-4, minutes=-27, seconds=25, microseconds=-861654)
316 expected_diff -= timedelta(hours=20, minutes=76)
320 self.assertEqual(dt - ext_dt, timedelta(days=util.extended_datetime.DAYS_IN_400_YEARS))
321 self.assertEqual(ext_dt - dt, -timedelta(days=util.extended_datetime.DAYS_IN_400_YEARS))