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 0253e4e commit 80a1004Copy full SHA for 80a1004
.github/scripts/update_readme.py
@@ -1,7 +1,7 @@
1
import os
2
from datetime import datetime
3
import subprocess
4
-import pytz # Requires: pip install pytz
+from zoneinfo import ZoneInfo # built-in since Python 3.9
5
6
README_PATH = "README.md"
7
@@ -25,9 +25,8 @@ def last_updated():
25
utc_time_str = result.stdout.strip()
26
utc_time = datetime.fromisoformat(utc_time_str)
27
28
- # Convert to IST
29
- ist = pytz.timezone("Asia/Kolkata")
30
- ist_time = utc_time.astimezone(ist)
+ # Convert to IST without pytz
+ ist_time = utc_time.astimezone(ZoneInfo("Asia/Kolkata"))
31
32
# Return formatted date
33
return ist_time.strftime("%d %b %Y, %I:%M %p IST")
0 commit comments