Browse Source

时间调整

xyxie 1 year ago
parent
commit
039f93265b
1 changed files with 2 additions and 1 deletions
  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)