<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def knx_to_datetime(knxdata):
 """Convert a an 8 byte KNX time and date object to its components"""


    if len(knxdata) != 8:
        raise KNXException("Can only convert an 8 Byte object to datetime")

    year = knxdata[0] + 1900
    month = knxdata[1]
    day = knxdata[2]
    hour = knxdata[3] & 0x1f
    minute = knxdata[4]
    second = knxdata[5]

    return datetime(year, month, day, hour, minute, second)