浏览代码

时间调整

xyxie 1 年之前
父节点
当前提交
039f93265b
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      yongyi_pig/yongyi_pig_manual.py

+ 2 - 1
yongyi_pig/yongyi_pig_manual.py

@@ -97,7 +97,8 @@ def yongyi_download(dayFlag, weekFlag):
         # new_dir = '/Users/xiexiaoyuan/Downloads/yongyi'
         new_dir = r'D:/eta/yongyi_data/yongyi'
         current_time = datetime.datetime.now().strftime("%Y-%m-%d")
-        current_time_full = datetime.datetime.now().strftime("%Y年%m月%d日")
+        current_time_full = datetime.datetime.now().strftime('%Y{y}%m{m}%d{d}').format(y='年', m='月', d='日')
+        print(current_time_full)
 
         # 查找文件并重命名
         os.chdir(save_to_dir)