Skip to content

Commit 80a1004

Browse files
authored
Update update_readme.py
1 parent 0253e4e commit 80a1004

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/scripts/update_readme.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os
22
from datetime import datetime
33
import subprocess
4-
import pytz # Requires: pip install pytz
4+
from zoneinfo import ZoneInfo # built-in since Python 3.9
55

66
README_PATH = "README.md"
77

@@ -25,9 +25,8 @@ def last_updated():
2525
utc_time_str = result.stdout.strip()
2626
utc_time = datetime.fromisoformat(utc_time_str)
2727

28-
# Convert to IST
29-
ist = pytz.timezone("Asia/Kolkata")
30-
ist_time = utc_time.astimezone(ist)
28+
# Convert to IST without pytz
29+
ist_time = utc_time.astimezone(ZoneInfo("Asia/Kolkata"))
3130

3231
# Return formatted date
3332
return ist_time.strftime("%d %b %Y, %I:%M %p IST")

0 commit comments

Comments
 (0)