input: Write a python function to calculate the difference in seconds between two given times in "HH:MM:SS" format.
  assert time_diff('08:30:15', '10:20:20') == 6605.0
  assert time_diff('12:00:00', '12:00:30') == 30.0
  assert time_diff('23:59:59', '00:00:01') == 2.0
output: def time_diff(time1, time2):
      from datetime import datetime
      
      # Convert strings to datetime objects
      fmt = "%H:%M:%S"
      t1 = datetime.strptime(time1, fmt)
      t2 = datetime.strptime(time2, fmt)
      
      # Calculate the difference in seconds
      diff = (t2 - t1).total_seconds()
      
      # Handle cases where t2 is earlier in the day than t1
      if diff < 0:
          diff += 24 * 3600  # add one day in seconds
      
      return diff