for dl in dls:
r = list(dl)
r[4] = r[4].strftime("%Y-%m-%d %H:%M:%S")
- r[8] = r[8].strftime("%Y-%m-%d %H:%M:%S")
+ if r[8]!=None:
+ r[8] = r[8].strftime("%Y-%m-%d %H:%M:%S")
+ else:
+ r[8]="2011-04-01 00:00:00"
r[9] = r[9].strftime("%Y-%m-%d %H:%M:%S")
ret.append(r)
return ret
#recdblist.printutf8(dl)
r = list(dl)
r[4] = r[4].strftime("%Y-%m-%d %H:%M:%S")
- r[9] = r[9].strftime("%Y-%m-%d %H:%M:%S")
+ if r[9]!=None:
+ r[9] = r[9].strftime("%Y-%m-%d %H:%M:%S")
+ else:
+ r[9]="2011-04-01 00:00:00"
r[10] = r[10].strftime("%Y-%m-%d %H:%M:%S")
r[5] = str(r[5])
ret.append(r)
+ import random
+ ret.insert(0,ret[random.randint(0,len(ret)-1)])
return ret
def select_by_ch_epg_ch(self, ch):
db = self.connect_db()