s_t=time.strptime(shijian,"%Y-%m-%d %H:%M:%S")
mkt=int(time.mktime(s_t))
host="10.177.254.115", # 主机名
cur.execute("SELECT * FROM qqq")
for row in cur.fetchall():
print(timestamp(str(row[6])))
updata_time = timestamp(str(row[6]))
now_time = calendar.timegm(time.gmtime())
print(now_time-updata_time)
print('totally cost', round((now_time-updata_time)/60, 2), '分钟')
if round((now_time-updata_time)/60, 2)>= 120:
print('这个过去了2小时,要删除\n------------------------------')
#cur.execute("DELETE FROM qqq WHERE UPDATED_AT_='"+ str(row[6]) +"';")
sql ="DELETE FROM qqq WHERE UPDATED_AT_='"+str(row[6])+"';"
print('\n------------------------------')