def _datetime_in_range(self, dt, dt_min=None, dt_max=None):
<EOL>dt = dt.replace(microsecond=<NUM_LIT:0>)<EOL>if dt_min:<EOL><INDENT>dt_min = dt_min.replace(microsecond=<NUM_LIT:0>)<EOL><DEDENT>else:<EOL><INDENT>dt_min = dsub_util.replace_timezone(datetime.datetime.min, pytz.utc)<EOL><DEDENT>if dt_max:<EOL><INDENT>dt_max = dt_max.replace(microsecond=<NUM_LIT:0>)<EOL><DEDENT>else:<EOL><INDENT>dt_max = dsub_util.replace_timezone(datetime.datetime.max, pytz.utc)<EOL><DEDENT>return dt_min <= dt <= dt_max<EOL>
Determine if the provided time is within the range, inclusive.