Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f924d2 commit f9bd914Copy full SHA for f9bd914
1 file changed
Lib/email/utils.py
@@ -386,7 +386,7 @@ def localtime(dt=None, isdst=-1):
386
387
"""
388
if dt is None:
389
- dt = datetime.datetime.now(datetime.timezone.utc)
+ return datetime.datetime.now(datetime.timezone.utc).astimezone()
390
if dt.tzinfo is not None:
391
return dt.astimezone()
392
# We have a naive datetime. Convert to a (localtime) timetuple and pass to
0 commit comments