def ByteToTime(self, time): Obj = Time() Obj.HighYear = time[0] >> 4 Obj.LowYear = time[0] & 0x00F Obj.Month = time[1] Obj.Day = time[2] Obj.HighHour = time[3] >> 2 Obj.LowHour = time[3] & 0x03 Obj.Minute = time[4] return Obj
def ByteToTime(self,time): Obj=Time() Obj.HighYear=time[0]>>4 Obj.LowYear=time[0]&0x00F Obj.Month=time[1] Obj.Day=time[2] Obj.HighHour=time[3]>>2 Obj.LowHour=time[3]&0x03 Obj.Minute=time[4] return Obj