LeptaLuma commited on
Commit
f9a0ced
·
verified ·
1 Parent(s): df7ab8d

fix check_time_sum_67

Browse files
Files changed (1) hide show
  1. app.py +9 -2
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
- dt = datetime.strptime(date_str, "%Y-%m-%d %H:%M:%S")
19
- return dt.hour + dt.minute == 67
 
 
 
 
 
 
 
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: