Spaces:
Sleeping
Sleeping
Update 250309_2137
Browse files
app.py
CHANGED
|
@@ -21,6 +21,7 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 21 |
tz = pytz.timezone(timezone)
|
| 22 |
# Get current time in that timezone
|
| 23 |
local_time = datetime.datetime.now(tz).strftime("%Y-%m-%d %H:%M:%S")
|
|
|
|
| 24 |
return f"The current local time in {timezone} is: {local_time}"
|
| 25 |
except Exception as e:
|
| 26 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
|
|
|
| 21 |
tz = pytz.timezone(timezone)
|
| 22 |
# Get current time in that timezone
|
| 23 |
local_time = datetime.datetime.now(tz).strftime("%Y-%m-%d %H:%M:%S")
|
| 24 |
+
print(f"The current local time in {timezone} is: {local_time}")
|
| 25 |
return f"The current local time in {timezone} is: {local_time}"
|
| 26 |
except Exception as e:
|
| 27 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|