Lines Matching refs:astimezone
2754 self.assertEqual(dt.astimezone(), dt_utc) # naive
2755 self.assertRaises(TypeError, dt.astimezone, f, f) # too many args
2756 self.assertRaises(TypeError, dt.astimezone, dt) # arg wrong type
2758 self.assertEqual(dt.astimezone(f), dt_f) # naive
2759 self.assertEqual(dt.astimezone(tz=f), dt_f) # naive
2765 self.assertRaises(ValueError, dt.astimezone, bog) # naive
2766 self.assertEqual(dt.replace(tzinfo=bog).astimezone(f), dt_f)
2772 self.assertRaises(ValueError, dt.astimezone, alsobog) # also naive
2780 dt_broken.astimezone()
2833 base_d.astimezone(timezone.utc)),
4329 now2 = utcnow.astimezone(weirdtz)
4494 dtz.astimezone(timezone.utc).timetuple()[:-1])
4580 self.assertRaises(ValueError, dt.astimezone, fnone)
4582 x = dt.astimezone(dt.tzinfo)
4588 got = dt.astimezone(fm5h)
4603 self.assertEqual(dt.astimezone(None), dt)
4604 self.assertEqual(dt.astimezone(), dt)
4611 local = dt.astimezone()
4615 local = dt.astimezone()
4623 t = u.astimezone()
4624 s = t.astimezone()
4810 self.assertEqual(dt.astimezone(tz), dt)
4812 asutc = dt.astimezone(utc)
4813 there_and_back = asutc.astimezone(tz)
4831 self.assertEqual(there_and_back.astimezone(utc),
4832 dt.astimezone(utc))
4846 nexthour_tz = nexthour_utc.astimezone(tz)
4852 nexthour_tz = nexthour_utc.astimezone(tz)
4862 self.assertEqual(dt.astimezone(tz), dt)
4865 asutc = dt.astimezone(utc)
4866 there_and_back = asutc.astimezone(tz)
4928 got = fourback.astimezone(Eastern).replace(tzinfo=None)
4938 got = sixutc.astimezone(Eastern).replace(tzinfo=None)
4961 astz = asutc.astimezone(tz)
4973 now.astimezone(ok())
4978 self.assertRaises(ValueError, now.astimezone, notok())
4991 self.assertRaises(ValueError, dt.astimezone, tricky_notok())
5028 got = fstart.replace(tzinfo=utc_real).astimezone(FEastern)
5047 got = fstart.replace(tzinfo=utc_real).astimezone(FEastern)
5314 ldt = gdt.astimezone(Vilnius)
5321 ldt = gdt.astimezone(Vilnius)
5328 ldt = gdt.astimezone(Vilnius)
5338 gdt = ldt.astimezone(timezone.utc)
5343 gdt = ldt.astimezone(timezone.utc)
5348 gdt = ldt.astimezone(timezone.utc)
5353 gdt = ldt.astimezone(timezone.utc)
5458 adt0 = dt0.astimezone()
5459 adt1 = dt1.astimezone()
5557 self.assertEqual(t, t.astimezone(timezone.utc))
5559 self.assertEqual(t, t.astimezone(timezone.utc))
5563 t_fold_utc = t_fold.astimezone(timezone.utc)
5569 t_gap_utc = t_gap.astimezone(timezone.utc)
5842 adt = udt.replace(tzinfo=timezone.utc).astimezone(tz)
5847 self.assertEquivDatetimes(ldt.astimezone(timezone.utc),
5865 adt = udt.replace(tzinfo=timezone.utc).astimezone(tz)
5983 self.assertEqual(dt1.astimezone(timezone.utc), dt_utc)