Thanks to visit codestin.com Credit goes to github.com
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 7636a66 commit 25b9728Copy full SHA for 25b9728
1 file changed
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