def get_plc_datetime(self):
        """
        Get date and time from PLC.

        :return: date and time as datetime
        """
        type_ = c_int32
        buffer = (type_ * 9)()
        result = self.library.Cli_GetPlcDateTime(self.pointer, byref(buffer))
        check_error(result, context="client")

        return datetime(
            year = buffer[5] + 1900,
            month = buffer[4] + 1,
            day = buffer[3],
            hour = buffer[2],
            minute = buffer[1],
            second = buffer[0]
        )
Get date and time from PLC.

        :return: date and time as datetime