Home
last modified time | relevance | path

Searched refs:astimezone (Results 1 – 19 of 19) sorted by relevance

/third_party/python/Lib/email/
Dutils.py151 dt = dt.astimezone()
349 return datetime.datetime.now(datetime.timezone.utc).astimezone()
351 return dt.astimezone()
/third_party/python/Lib/test/
Ddatetimetester.py2755 self.assertEqual(dt.astimezone(), dt_utc) # naive
2756 self.assertRaises(TypeError, dt.astimezone, f, f) # too many args
2757 self.assertRaises(TypeError, dt.astimezone, dt) # arg wrong type
2759 self.assertEqual(dt.astimezone(f), dt_f) # naive
2760 self.assertEqual(dt.astimezone(tz=f), dt_f) # naive
2766 self.assertRaises(ValueError, dt.astimezone, bog) # naive
2767 self.assertEqual(dt.replace(tzinfo=bog).astimezone(f), dt_f)
2773 self.assertRaises(ValueError, dt.astimezone, alsobog) # also naive
2781 dt_broken.astimezone()
2834 base_d.astimezone(timezone.utc)),
[all …]
Dtest_logging.py4000 r.created = time.mktime(dt.astimezone(None).timetuple())
4016 r.created = time.mktime(dt.astimezone(None).timetuple())
/third_party/python/Tools/scripts/
Ddiff.py17 return t.astimezone().isoformat()
/third_party/python/Doc/library/
Dzoneinfo.rst37 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))
Ddatetime.rst1236 .. method:: datetime.astimezone(tz=None)
1251 If ``self.tzinfo`` is *tz*, ``self.astimezone(tz)`` is equal to *self*: no
1254 ``astz = dt.astimezone(tz)``, ``astz - astz.utcoffset()`` will have
1263 :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 that
1608 # See datetime.astimezone or fromtimestamp.
1638 >>> dt3 = dt2.astimezone(timezone.utc)
2005 only on geographic location. The implementation of :meth:`datetime.astimezone`
[all …]
/third_party/python/Lib/test/test_zoneinfo/
Dtest_zoneinfo.py375 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)
/third_party/python/Misc/NEWS.d/
D3.7.0rc1.rst56 returning None is now treated as naive by the astimezone() method.
D3.8.0a2.rst336 :meth:`datetime.datetime.astimezone` and alternate constructors like
D3.6.6rc1.rst133 returning None is now treated as naive by the astimezone() method.
D3.5.2rc1.rst905 Fixed a bug in datetime.astimezone() method.
D3.6.0a1.rst1423 Fixed a bug in datetime.astimezone() method.
D3.8.0a1.rst4230 returning None is now treated as naive by the astimezone() method.
/third_party/python/Lib/
Dimaplib.py1518 timezone.utc).astimezone()
Ddatetime.py1860 def astimezone(self, tz=None): member in datetime
/third_party/python/Doc/whatsnew/
D3.8.rst448 :meth:`~datetime.datetime.astimezone`.
D3.6.rst483 ... t = u.astimezone(Eastern)
D3.3.rst1085 * The :meth:`datetime.datetime.astimezone` method can now be
/third_party/python/Misc/
DHISTORY6657 - Issue #665194: Update `email.utils.localtime` to use datetime.astimezone and
7262 - Issue #9527: datetime.astimezone() method will now supply a class
22031 In dt.astimezone(tz), if tz.utcoffset(dt) returns a duration,
22046 datetime.astimezone(tz) no longer raises an exception when the
22053 dt.astimezone() can no longer be used to convert between naive and aware
22061 a local time. The default astimezone() implementation calls fromutc()