Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,8 +24,8 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 24 |
tz = pytz.timezone(timezone)
|
| 25 |
local_time = datetime.datetime.now(tz).strftime("%Y-%m-%d %H:%M:%S")
|
| 26 |
return f"The current local time in {timezone} is: {local_time}"
|
| 27 |
-
|
| 28 |
-
|
| 29 |
|
| 30 |
final_answer = FinalAnswerTool()
|
| 31 |
model = InferenceClientModel(
|
|
|
|
| 24 |
tz = pytz.timezone(timezone)
|
| 25 |
local_time = datetime.datetime.now(tz).strftime("%Y-%m-%d %H:%M:%S")
|
| 26 |
return f"The current local time in {timezone} is: {local_time}"
|
| 27 |
+
except Exception as e:
|
| 28 |
+
return f"Error fetching timezone '{timezone}': {str(e)}'"
|
| 29 |
|
| 30 |
final_answer = FinalAnswerTool()
|
| 31 |
model = InferenceClientModel(
|