import time
time_tup = time.localtime(time.time())
t1 = time.strftime('%Y%m%d%H', time_tup)
if t1 <= time.strftime('%Y%m%d', time_tup) + '13':
t = time.strftime('%Y%m%d', time_tup) + '00'
else:
t = time.strftime('%Y%m%d', time_tup) + '12'
time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time())) >>> 2019-07-16 17:30:32