albertvillanova HF Staff commited on
Commit
fe04d94
·
verified ·
1 Parent(s): f19a729

Replace date

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -27,9 +27,9 @@ def update_datasets():
27
  )
28
  repo.git_pull()
29
  os.makedirs("dataset/data", exist_ok=True)
30
- yesterday = (datetime.datetime.now(datetime.timezone.utc).date() - datetime.timedelta(days=1)).isoformat()
31
- with repo.commit(f"Add {yesterday} data file"):
32
- with open(f"data/{yesterday}.json", "w") as f:
33
  json.dump([ds.id for ds in sorted(datasets, key=lambda item: item.id)], f)
34
 
35
 
 
27
  )
28
  repo.git_pull()
29
  os.makedirs("dataset/data", exist_ok=True)
30
+ today = datetime.datetime.now(datetime.timezone.utc).date().isoformat()
31
+ with repo.commit(f"Add {today} data file"):
32
+ with open(f"data/{today}.json", "w") as f:
33
  json.dump([ds.id for ds in sorted(datasets, key=lambda item: item.id)], f)
34
 
35