def get_time_string(start_datetime, end_datetime, config):
    # Use those dates to create the search string we're looking for in the GC file
    time_string = start_datetime.isoformat() + 'Z/' + end_datetime.isoformat() + 'Z'

    # Check if a period length is added to the 'Time' tag.
    detect_string = config['time'].split('/')
    if detect_string[0].startswith('P'):
        time_string = detect_string[0] + time_string + '/'
    elif detect_string[-1].startswith('P'):
        time_string += ('/' + detect_string[-1])

    return time_string
Returns a GetCapabilities date search string for the given start and end datetimes.
dataset/ETHPy150Open nasa-gibs/onearth/src/test/oe_test_utils.py/get_time_string