alexander1198 commited on
Commit
caa947c
·
verified ·
1 Parent(s): 14fc11e

Create get_current_time_in_timezone.py

Browse files
tools/get_current_time_in_timezone.py ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ from datetime import datetime
2
+ import pytz
3
+
4
+ def get_current_time_in_timezone(timezone: str) -> str:
5
+ tz = pytz.timezone(timezone)
6
+ return datetime.now(tz).strftime("%Y-%m-%d %H:%M:%S %Z")