commit | f9bd9141c5b608cdd1149b0f8fa874debcf1e6fa | [log] [tgz] |
---|---|---|
author | Alexander Belopolsky <alexander.belopolsky@gmail.com> | Wed Aug 22 23:02:36 2012 -0400 |
committer | Alexander Belopolsky <alexander.belopolsky@gmail.com> | Wed Aug 22 23:02:36 2012 -0400 |
tree | 48cdb5e876289475f35cbe0eb1e8737ab8079843 | |
parent | 1f924d21d3f8a7fba3409544abca53a814de15f6 [diff] |
Issue #665194: Added a small optimization
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 @@ """ 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