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 79e0f6f commit ad9f2edCopy full SHA for ad9f2ed
Lib/zoneinfo/_tzpath.py
@@ -131,7 +131,8 @@ def available_timezones():
131
# Start with loading from the tzdata package if it exists: this has a
132
# pre-assembled list of zones that only requires opening one file.
133
try:
134
- with resources.files("tzdata").joinpath("zones").open("r") as f:
+ zones_file = resources.files("tzdata").joinpath("zones")
135
+ with zones_file.open("r", encoding="utf-8") as f:
136
for zone in f:
137
zone = zone.strip()
138
if zone:
0 commit comments