def parse_time_range(start_dt, end_dt):
now = datetime.now()<EOL>if start_dt and not end_dt:<EOL><INDENT>end_dt = now<EOL><DEDENT>elif end_dt and not start_dt:<EOL><INDENT>start_dt = _EARLIEST_DATE<EOL><DEDENT>elif not start_dt and not end_dt:  <EOL><INDENT>end_dt = now<EOL>start_dt = end_dt - timedelta(days=<NUM_LIT:1>)<EOL><DEDENT>return tuple(map(truncate_hour_fraction, (start_dt, end_dt)))<EOL>
Convert the start/end datetimes specified by the user, specifically:
- truncate any minutes/seconds
- for a missing end time, use start + 24 hours
- for a missing start time, use end - 24 hours
- for missing start and end, use the last 24 hours