| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 | #!/usr/bin/env python# -*- coding: utf-8 -*-"""__title__ = '测试类'@Time    : 2020/9/24 19:44@Author  : Kenny-PC@Software: PyCharm# code is far away from bugs with the god animal protecting    I love animals. They taste delicious.              ┏┓      ┏┓            ┏┛┻━━━┛┻┓            ┃      ☃      ┃            ┃  ┳┛  ┗┳  ┃            ┃      ┻      ┃            ┗━┓      ┏━┛                ┃      ┗━━━┓                ┃  神兽保佑    ┣┓                ┃ 永无BUG!   ┏┛                ┗┓┓┏━┳┓┏┛                  ┃┫┫  ┃┫┫                  ┗┻┛  ┗┻┛"""import timefrom LoggerService import LoggerService# import account_list as alfrom util import date_util,platform_utildef start_order_job(log):	log.info('start_order_job')start_order_time = '2020-09-21 16:05:00'start_cost_time = '2020-09-21 16:35:00'if __name__ == '__main__':	log = LoggerService.logger_file('abc.log', 'abcd')	print(date_util.getYesterdayStartTime(), platform_util.getZzyQueryTime(date_util.getYesterdayStartTime()))	request_time_stamp = time.time()	st_unix = int((request_time_stamp + 8 * 3600) // 86400 * 86400 - 8 * 3600 - 86400)	et_unix = int((request_time_stamp + 8 * 3600) // 86400 * 86400 - 8 * 3600)	st_dt = time.strftime("%Y-%m-%dT%H:%M:%S", time.localtime(st_unix)) + '+08:00'	et_dt = time.strftime("%Y-%m-%dT%H:%M:%S", time.localtime(et_unix)) + '+08:00'	print(st_unix, st_dt)	print(et_unix, et_dt)	print('时间转换')	print(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(date_util.getYesterdayStartTime())))	print(date_util.getCurrentSecondTime())	print(date_util.getSecondsToDatetime())	print(date_util.getSecondsToDatetime(date_util.getYesterdayStartTime()))	print(date_util.getSecondsToDatetime(date_util.getYesterdayStartTime(), "%Y-%m-%d %H:%M:%S"))# sql = "select * from quchen_text.order where date=1600790400"# connect = MySQLConnection('test')# try:# 	page = 1# 	size = 50# 	pagination = connect.listByPage(sql, page, size)# 	print(pagination)# except Exception as e:# 	log.exception(e)# finally:# 	# 关闭数据库连接# 	connect.close()# scheduler = BlockingScheduler()# scheduler.add_job(start_order_job, args=(log,), trigger='interval', max_instances=10, seconds=10,# 				  start_date=start_order_time)# scheduler.start()
 |