// Convert image datetime to unix time
timestamp = dt_parser(img_time.replace("-", ""))
time_delta = timestamp - datetime.datetime(1970, 1, 1)
unix_time = (time_delta.days * 24 * 3600) + time_delta.seconds
// Does the image date-time fall outside or inside the included range
if unix_time < start_date or unix_time > end_date:
return False
After Change
// Convert image datetime to unix time
img_time = img_time.replace("-", "").replace("_", "")
timestamp = dt_parser(img_time)
time_delta = timestamp - datetime.datetime(1970, 1, 1)
unix_time = (time_delta.days * 24 * 3600) + time_delta.seconds
// Does the image date-time fall outside or inside the included range
if unix_time < start_date or unix_time > end_date:
return False