Invalid datetime component

I am trying to pull some data using the code given in benchmark, and the code run perfectly fine for some data points but not for the remaining data points, and the error is generated at time_of_interest part, I have not changed any part of the code to get time of interest and bounding box.
code to retrive bbox:
def get_bounding_box(latitude, longitude, meter_buffer=5000):
“”"
Given a latitude, longitude, and buffer in meters, returns a bounding
box around the point with the buffer on the left, right, top, and bottom.

Returns a list of [minx, miny, maxx, maxy]
"""
distance_search = distance.distance(meters=meter_buffer)

# calculate the lat/long bounds based on ground distance
# bearings are cardinal directions to move (south, west, north, and east)
min_lat = distance_search.destination((latitude, longitude), bearing=180)[0]
min_long = distance_search.destination((latitude, longitude), bearing=270)[1]
max_lat = distance_search.destination((latitude, longitude), bearing=0)[0]
max_long = distance_search.destination((latitude, longitude), bearing=90)[1]

return [min_long, min_lat, max_long, max_lat]

code to retirve date range
def get_date_range(date, time_buffer_days=15):
“”"Get a date range to search for in the planetary computer based
on a sample’s date. The time range will include the sample date
and time_buffer_days days prior

Returns a string"""
datetime_format = "%Y-%m-%dT"
range_start = pd.to_datetime(date) - timedelta(days=time_buffer_days)
date_range = f"{range_start.strftime(datetime_format)}/{pd.to_datetime(date).strftime(datetime_format)}"

return date_range

The datetime issue is addressed in this thread: Benchmark code not working?