I have this function that gets the closest matches for every countryCode (based on a date in epoch time) from a model to a certain given time, dt being the the difference in tim