Spaces:
Sleeping
Sleeping
fix check_time_sum_67
Browse files
app.py
CHANGED
|
@@ -15,8 +15,15 @@ def check_time_sum_67(date_str: str) -> bool: #it's import to specify the return
|
|
| 15 |
Args:
|
| 16 |
date_str: DateTime string in format "%Y-%m-%d %H:%M:%S"
|
| 17 |
"""
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
@tool
|
| 22 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
|
|
| 15 |
Args:
|
| 16 |
date_str: DateTime string in format "%Y-%m-%d %H:%M:%S"
|
| 17 |
"""
|
| 18 |
+
# Split the datetime string to extract time part
|
| 19 |
+
time_part = date_str.split(' ')[1]
|
| 20 |
+
|
| 21 |
+
# Split hours and minutes
|
| 22 |
+
hours, minutes, seconds = time_part.split(':')
|
| 23 |
+
|
| 24 |
+
# Convert to integers and check if sum equals 67
|
| 25 |
+
total = int(hours) + int(minutes)
|
| 26 |
+
return total == 67
|
| 27 |
|
| 28 |
@tool
|
| 29 |
def get_current_time_in_timezone(timezone: str) -> str:
|