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 d88a414 commit 97571fdCopy full SHA for 97571fd
Lib/zoneinfo/_tzpath.py
@@ -124,7 +124,8 @@ def available_timezones():
124
# Start with loading from the tzdata package if it exists: this has a
125
# pre-assembled list of zones that only requires opening one file.
126
try:
127
- with resources.files("tzdata").joinpath("zones").open("r") as f:
+ zones_file = resources.files("tzdata").joinpath("zones")
128
+ with zones_file.open("r", encoding="utf-8") as f:
129
for zone in f:
130
zone = zone.strip()
131
if zone:
0 commit comments