diff options
author | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-06-09 19:02:01 +0300 |
---|---|---|
committer | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-06-09 19:02:01 +0300 |
commit | 4a29d649866ff133e0b8f8a1009e1000a44d7279 (patch) | |
tree | 547229aded91b3760628c646a144af604f1c3e2b /contrib/tools/python3/src/Lib/datetime.py | |
parent | 782f2445a283aed9a66e699137b3349af1689c29 (diff) | |
download | ydb-4a29d649866ff133e0b8f8a1009e1000a44d7279.tar.gz |
intermediate changes
ref:478170c7a5a1c0788ddd0d6513ce4ed86d7d7c99
Diffstat (limited to 'contrib/tools/python3/src/Lib/datetime.py')
-rw-r--r-- | contrib/tools/python3/src/Lib/datetime.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/tools/python3/src/Lib/datetime.py b/contrib/tools/python3/src/Lib/datetime.py index 6bf37ccfab..d087c9852c 100644 --- a/contrib/tools/python3/src/Lib/datetime.py +++ b/contrib/tools/python3/src/Lib/datetime.py @@ -1652,7 +1652,7 @@ class datetime(date): y, m, d, hh, mm, ss, weekday, jday, dst = converter(t) ss = min(ss, 59) # clamp out leap seconds if the platform has them result = cls(y, m, d, hh, mm, ss, us, tz) - if tz is None: + if tz is None and not utc: # As of version 2015f max fold in IANA database is # 23 hours at 1969-09-30 13:00:00 in Kwajalein. # Let's probe 24 hours in the past to detect a transition: @@ -1673,7 +1673,7 @@ class datetime(date): probe2 = cls(y, m, d, hh, mm, ss, us, tz) if probe2 == result: result._fold = 1 - else: + elif tz is not None: result = tz.fromutc(result) return result |