# import redis
#
#
# r = redis.Redis(host="114.115.236.206", port=6379, password='clbzzsn',db=3)
#
# # 获取所有键
# keys = r.keys('*')
# # print(keys)
# for key in keys:
#     f_key = key.decode()
#     print(f_key)
#     print("----------")
#     res = r.exists(f_key)
#     value = list(r.smembers(f_key))
#     # 对列表进行排序
#     value.sort()
#     # 遍历排序后的列表
#     list_data = []
#     for member in value:
#         member = member.decode()
#         members = member.strip('[').strip(']').replace('\'','').strip().split(',')
#         #获取每一个报告期
#         for date in members:
#             data = date.strip()
#             # print(date.strip())
#             list_data.append(data)
#     # 放入redis
#     for item in list_data:
#         r.sadd(key, item)
#
#     # 获取Set中的所有元素
#     items = r.smembers(key)
#     # print(items)
#     print("======================================")

import datetime

timestamp = 1688054400  # 示例时间戳
date = datetime.datetime.fromtimestamp(timestamp).strftime('%Y-%m-%d %H:%M:%S')

print(date)

