Searched refs:astimezone (Results 1 – 22 of 22) sorted by relevance
199 t0_syd0 = t0_u.astimezone(SYD)200 t1_syd1 = t1_u.astimezone(SYD)221 t0 = t0_u.astimezone(SYD)222 t1 = t1_u.astimezone(SYD)243 t0_tor = t0_u.astimezone(TOR)244 t1_tor = t1_u.astimezone(TOR)266 t0 = t0_u.astimezone(TOR)267 t1 = t1_u.astimezone(TOR)289 t0 = t0_u.astimezone(LON)290 t1 = t1_u.astimezone(LON)[all …]
1070 assert dt.astimezone(tz.tzutc()) == dt_exp.astimezone(tz.tzutc())1083 assert dt.astimezone(tz.tzutc()) == dt_exp.astimezone(tz.tzutc())
151 dt = dt.astimezone()354 return datetime.datetime.now(datetime.timezone.utc).astimezone()356 return dt.astimezone()
2531 self.assertEqual(dt.astimezone(), dt_utc) # naive2532 self.assertRaises(TypeError, dt.astimezone, f, f) # too many args2533 self.assertRaises(TypeError, dt.astimezone, dt) # arg wrong type2535 self.assertEqual(dt.astimezone(f), dt_f) # naive2536 self.assertEqual(dt.astimezone(tz=f), dt_f) # naive2542 self.assertRaises(ValueError, dt.astimezone, bog) # naive2543 self.assertEqual(dt.replace(tzinfo=bog).astimezone(f), dt_f)2549 self.assertRaises(ValueError, dt.astimezone, alsobog) # also naive2557 dt_broken.astimezone()4071 now2 = utcnow.astimezone(weirdtz)[all …]
3547 r.created = time.mktime(dt.astimezone(None).timetuple())
1682 self.assertRaises(TypeError, dt.astimezone) # not enough args1683 self.assertRaises(TypeError, dt.astimezone, f, f) # too many args1684 self.assertRaises(TypeError, dt.astimezone, dt) # arg wrong type1685 self.assertRaises(ValueError, dt.astimezone, f) # naive1686 self.assertRaises(ValueError, dt.astimezone, tz=f) # naive1692 self.assertRaises(ValueError, dt.astimezone, bog) # naive1698 self.assertRaises(ValueError, dt.astimezone, alsobog) # also naive2694 now2 = utcnow.astimezone(weirdtz)2928 self.assertRaises(ValueError, dt.astimezone, fnone)2930 self.assertRaises(TypeError, dt.astimezone, None)[all …]
120 utc_datetime = local_datetime.astimezone(tz=pytz.utc)
17 return t.astimezone().isoformat()
903 .. method:: datetime.astimezone(tz)914 If ``self.tzinfo`` is *tz*, ``self.astimezone(tz)`` is equal to *self*: no917 ``astz = dt.astimezone(tz)``, ``astz - astz.utcoffset()`` will usually have929 :class:`tzinfo` subclass to affect the result returned by :meth:`astimezone`.930 Ignoring error cases, :meth:`astimezone` acts like::932 def astimezone(self, tz):1161 >>> dt3 = dt2.astimezone(GMT2())1423 only on geographic location. The implementation of :meth:`datetime.astimezone`1427 :meth:`tzinfo.fromutc` to work correctly with :meth:`astimezone` regardless.1488 This is called from the default :class:`datetime.astimezone()`[all …]
1054 .. method:: datetime.astimezone(tz=None)1069 If ``self.tzinfo`` is *tz*, ``self.astimezone(tz)`` is equal to *self*: no1072 ``astz = dt.astimezone(tz)``, ``astz - astz.utcoffset()`` will have1081 :class:`tzinfo` subclass to affect the result returned by :meth:`astimezone`.1082 Ignoring error cases, :meth:`astimezone` acts like::1084 def astimezone(self, tz):1096 The :meth:`astimezone` method can now be called on naive instances that1394 >>> dt3 = dt2.astimezone(GMT2())1743 only on geographic location. The implementation of :meth:`datetime.astimezone`1747 :meth:`tzinfo.fromutc` to work correctly with :meth:`astimezone` regardless.[all …]
1227 >>> datetime.now(tzoffset("BRST", -10800)).astimezone(tzutc())1247 >>> datetime.now(tzlocal()).astimezone(tzoffset(None, 0))1306 >>> dt.astimezone(tz2).strftime('%X %x %Z')1383 >>> datetime.now(tz).astimezone(tzutc())
56 returning None is now treated as naive by the astimezone() method.
133 returning None is now treated as naive by the astimezone() method.
906 Fixed a bug in datetime.astimezone() method.
1424 Fixed a bug in datetime.astimezone() method.
1537 dt_rt = dt.replace(tzinfo=tz).astimezone(tzutc()).astimezone(tz)
1483 timezone.utc).astimezone()
1813 def astimezone(self, tz=None): member in datetime
483 ... t = u.astimezone(Eastern)
1085 * The :meth:`datetime.datetime.astimezone` method can now be
4647 In dt.astimezone(tz), if tz.utcoffset(dt) returns a duration,4662 datetime.astimezone(tz) no longer raises an exception when the4669 dt.astimezone() can no longer be used to convert between naive and aware4677 a local time. The default astimezone() implementation calls fromutc()
6657 - Issue #665194: Update `email.utils.localtime` to use datetime.astimezone and7262 - Issue #9527: datetime.astimezone() method will now supply a class22031 In dt.astimezone(tz), if tz.utcoffset(dt) returns a duration,22046 datetime.astimezone(tz) no longer raises an exception when the22053 dt.astimezone() can no longer be used to convert between naive and aware22061 a local time. The default astimezone() implementation calls fromutc()