def getDate(self, line): date = None dateMatch = self.matchDate(line) if dateMatch: # extract part of format which represents seconds since epoch date = list(MyTime.localtime(float(dateMatch.group()))) return date
def getDate(self, line): date = None dateMatch = self.matchDate(line) if dateMatch: # extract part of format which represents seconds since epoch value = dateMatch.group() seconds_since_epoch = value[2:17] # convert seconds from HEX into local time stamp date = list(MyTime.localtime(int(seconds_since_epoch, 16))) return date