From 5bcfed84d200df1289ec69396cecc055124b8c54 Mon Sep 17 00:00:00 2001
From: Pithon Kabiro <pithon.kabiro@hft-stuttgart.de>
Date: Wed, 2 Jun 2021 15:13:49 +0200
Subject: [PATCH] Fix bug in naming of result folder

---
 disaggregation_lookahead.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/disaggregation_lookahead.py b/disaggregation_lookahead.py
index e703b01..f2f1d7a 100644
--- a/disaggregation_lookahead.py
+++ b/disaggregation_lookahead.py
@@ -504,7 +504,8 @@ def main(argv):
     end = time.time()
     print('Runtime: ',end - start )
     d = datetime.now()
-    folderName = f'result_{d.year}{d.month}{d.day}{d.hour}{d.minute}{d.second}'
+    d_formatted = d.strftime('%Y%m%d%H%M%S') # Ensure that single digit days and months are padded with a leading `0` 
+    folderName = f'result_{d_formatted}'
     filepathHtml = f'{folderName}.html'
 
     # create folder for files
-- 
GitLab