def parse_datetime_params():
    'Transform into datetime objects used for filtering form responses.'
    begin_datetime_str = request.args.get('beginDateTime', '2000-01-01')
    begin_datetime = dtparser(begin_datetime_str).replace(tzinfo=timezone.utc)
    end_datetime_str = request.args.get('endDateTime')
    if (end_datetime_str is not None):
        end_datetime = dtparser(end_datetime_str)
    else:
        end_datetime = (datetime.now() + timedelta(days=(365 * 10)))
    end_datetime = end_datetime.replace(tzinfo=timezone.utc)
    if (end_datetime == begin_datetime):
        end_datetime = (end_datetime + timedelta(days=1))
    if (begin_datetime > end_datetime):
        raise BadRequest('beginDateTime value must be lower than endDateTime')
    return (begin_datetime, end_datetime)
Transform into datetime objects used for filtering form responses.
def parse_datetime_params():
    
    begin_datetime_str = request.args.get('beginDateTime', '2000-01-01')
    begin_datetime = dtparser(begin_datetime_str).replace(tzinfo=timezone.utc)
    end_datetime_str = request.args.get('endDateTime')
    if (end_datetime_str is not None):
        end_datetime = dtparser(end_datetime_str)
    else:
        end_datetime = (datetime.now() + timedelta(days=(365 * 10)))
    end_datetime = end_datetime.replace(tzinfo=timezone.utc)
    if (end_datetime == begin_datetime):
        end_datetime = (end_datetime + timedelta(days=1))
    if (begin_datetime > end_datetime):
        raise BadRequest('beginDateTime value must be lower than endDateTime')
    return (begin_datetime, end_datetime)