Searched refs:astimezone (Results 1 – 19 of 19) sorted by relevance
151 dt = dt.astimezone()349 return datetime.datetime.now(datetime.timezone.utc).astimezone()351 return dt.astimezone()
2755 self.assertEqual(dt.astimezone(), dt_utc) # naive2756 self.assertRaises(TypeError, dt.astimezone, f, f) # too many args2757 self.assertRaises(TypeError, dt.astimezone, dt) # arg wrong type2759 self.assertEqual(dt.astimezone(f), dt_f) # naive2760 self.assertEqual(dt.astimezone(tz=f), dt_f) # naive2766 self.assertRaises(ValueError, dt.astimezone, bog) # naive2767 self.assertEqual(dt.replace(tzinfo=bog).astimezone(f), dt_f)2773 self.assertRaises(ValueError, dt.astimezone, alsobog) # also naive2781 dt_broken.astimezone()2834 base_d.astimezone(timezone.utc)),[all …]
4000 r.created = time.mktime(dt.astimezone(None).timetuple())4016 r.created = time.mktime(dt.astimezone(None).timetuple())
17 return t.astimezone().isoformat()
37 method or :meth:`datetime.astimezone <datetime.datetime.astimezone>`::81 >>> print(dt_utc.astimezone(LOS_ANGELES))85 >>> print((dt_utc + timedelta(hours=1)).astimezone(LOS_ANGELES))
1236 .. method:: datetime.astimezone(tz=None)1251 If ``self.tzinfo`` is *tz*, ``self.astimezone(tz)`` is equal to *self*: no1254 ``astz = dt.astimezone(tz)``, ``astz - astz.utcoffset()`` will have1263 :class:`tzinfo` subclass to affect the result returned by :meth:`astimezone`.1264 Ignoring error cases, :meth:`astimezone` acts like::1266 def astimezone(self, tz):1278 The :meth:`astimezone` method can now be called on naive instances that1608 # See datetime.astimezone or fromtimestamp.1638 >>> dt3 = dt2.astimezone(timezone.utc)2005 only on geographic location. The implementation of :meth:`datetime.astimezone`[all …]
375 dt_before = dt_before_utc.astimezone(zi)378 dt_after = dt_after_utc.astimezone(zi)582 dt_actual = dt_utc.astimezone(zi)585 dt_utc_actual = dt_local.astimezone(timezone.utc)757 self.assertEqual(dt_utc.astimezone(zi), dt)976 dt_act = dt_utc.astimezone(zi)987 dt_act = dt_exp.astimezone(timezone.utc)
56 returning None is now treated as naive by the astimezone() method.
336 :meth:`datetime.datetime.astimezone` and alternate constructors like
133 returning None is now treated as naive by the astimezone() method.
905 Fixed a bug in datetime.astimezone() method.
1423 Fixed a bug in datetime.astimezone() method.
4230 returning None is now treated as naive by the astimezone() method.
1518 timezone.utc).astimezone()
1860 def astimezone(self, tz=None): member in datetime
448 :meth:`~datetime.datetime.astimezone`.
483 ... t = u.astimezone(Eastern)
1085 * The :meth:`datetime.datetime.astimezone` method can now be
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()