Your problem is that you cannot change the the QString
by item assignment (a[2] = ' '
); you get a TypeError
whenever you try to do something to an object that isn't allowed. You have to create a new string and assign it to the variable. So, replace the line
self.updateTime[2]= ' '
with the following
self.updateTime = self.updateTime[:2] + ' ' +self.updateTime[3:]