def iso_date_to_datetime(string):
    """
    >>> iso_date_to_datetime('2013-12-26T10:11:12Z')
    datetime.datetime(2013, 12, 26, 10, 11, 12)

    >>> iso_date_to_datetime('2013-12-26T10:11:12.456789Z')
    datetime.datetime(2013, 12, 26, 10, 11, 12, 456789)

    >>> iso_date_to_datetime('2013-12-26T10:11:12.30Z')
    datetime.datetime(2013, 12, 26, 10, 11, 12, 300000)

    >>> iso_date_to_datetime('2013-12-26T10:11:12.00001Z')
    datetime.datetime(2013, 12, 26, 10, 11, 12, 10)

    >>> iso_date_to_datetime('2013-12-26T10:11:12.000001Z')
    datetime.datetime(2013, 12, 26, 10, 11, 12, 1)

    >>> iso_date_to_datetime('2013-12-26T10:11:12.0000001Z')
    datetime.datetime(2013, 12, 26, 10, 11, 12)

    >>> iso_date_to_datetime('2013-12-26T10:11:12.000000Z')
    datetime.datetime(2013, 12, 26, 10, 11, 12)
    """

    nums = DATE_TIMESPLIT.split(string)
    if nums[-1] == '':
        nums = nums[:-1]

    if len(nums) == 7:
        nums[6] = nums[6][:6]
        nums[6] += PAD_MICRO[len(nums[6]):]

    the_datetime = datetime.datetime(*(int(num) for num in nums))
    return the_datetime