diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/email/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/email/utils.py b/Lib/email/utils.py index f32cdd9..73bc348 100644 --- a/Lib/email/utils.py +++ b/Lib/email/utils.py @@ -386,7 +386,7 @@ def localtime(dt=None, isdst=-1): """ if dt is None: - dt = datetime.datetime.now(datetime.timezone.utc) + return datetime.datetime.now(datetime.timezone.utc).astimezone() if dt.tzinfo is not None: return dt.astimezone() # We have a naive datetime. Convert to a (localtime) timetuple and pass to |