林轩 il y a 1 an
Parent
commit
ee8ae39775
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      crond_script/today_weather.py

+ 1 - 1
crond_script/today_weather.py

@@ -92,7 +92,7 @@ def main():
     now = datetime.now()
     start_ct_time = now.strftime('%Y-%m-%d %H:%M:%S')
     now_hour = now.hour
-    today_str = datetime.strptime(f'{now.year-now.month-now.day} 19:00:00', "%Y:%m:%d %H:%M:%S")
+    today_str = datetime.strptime(f'{now.year}-{now.month}-{now.day} 19:00:00', "%Y-%m-%d %H:%M:%S")
     for day_obj in day_data:
         time_out = False 
         print(day_obj.cityid)