now = time.time()
midnight = now - (now % 86400) + time.timezone
premidnight =midnight- 86400
nowmidnight = midnight - 1
itime = time.ctime(nowmidnight)
midnight = now - (now % 86400) + time.timezone
premidnight =midnight- 86400
nowmidnight = midnight - 1
itime = time.ctime(nowmidnight)
print(itime)
#time.strftime("%Y-%m-%d %H:%M %p", time.localtime())
year = int(time.strftime("%Y", time.localtime()))
month = int(time.strftime("%m", time.localtime()))
month = month-1
days=int(time.strftime("%d",time.localtime()))