Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -42,7 +42,11 @@ def hourly_temperature(latitude: float, longitude: float) -> str:
|
|
| 42 |
|
| 43 |
@tool
|
| 44 |
def get_current_time_in_timezone(timezone: str) -> str:
|
| 45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
try:
|
| 47 |
tz = pytz.timezone(timezone)
|
| 48 |
local_time = datetime.datetime.now(tz).strftime("%Y-%m-%d %H:%M:%S")
|
|
|
|
| 42 |
|
| 43 |
@tool
|
| 44 |
def get_current_time_in_timezone(timezone: str) -> str:
|
| 45 |
+
"""Fetch current local time for a given timezone.
|
| 46 |
+
|
| 47 |
+
Args:
|
| 48 |
+
timezone: A string representing a valid timezone (e.g., 'Africa/Kigali').
|
| 49 |
+
"""
|
| 50 |
try:
|
| 51 |
tz = pytz.timezone(timezone)
|
| 52 |
local_time = datetime.datetime.now(tz).strftime("%Y-%m-%d %H:%M:%S")
|