From f9299a61cefb0941c7dd418818fc3a2123f001aa Mon Sep 17 00:00:00 2001 From: Joseph Lemaitre Date: Sat, 14 Oct 2023 12:00:50 +0200 Subject: [PATCH] change default run_id format to be compatible with windows --- flepimop/R_packages/flepicommon/R/file_paths.R | 2 +- flepimop/gempyor_pkg/src/gempyor/file_paths.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/flepimop/R_packages/flepicommon/R/file_paths.R b/flepimop/R_packages/flepicommon/R/file_paths.R index faf30d2ad..4d144c729 100644 --- a/flepimop/R_packages/flepicommon/R/file_paths.R +++ b/flepimop/R_packages/flepicommon/R/file_paths.R @@ -5,7 +5,7 @@ run_id <- function(){ rc <- "test" try({ - rc <- format(lubridate::now(),"%Y.%m.%d.%H:%M:%S.%Z") + rc <- format(lubridate::now(),"%Y%m%d_%H%M%S%Z") }, silent=TRUE) return(rc) } diff --git a/flepimop/gempyor_pkg/src/gempyor/file_paths.py b/flepimop/gempyor_pkg/src/gempyor/file_paths.py index f20f7048c..ee101ea53 100644 --- a/flepimop/gempyor_pkg/src/gempyor/file_paths.py +++ b/flepimop/gempyor_pkg/src/gempyor/file_paths.py @@ -17,8 +17,7 @@ def create_file_name_without_extension(run_id, prefix, index, ftype, create_dire def run_id(): - return datetime.datetime.strftime(datetime.datetime.now(), "%Y.%m.%d.%H:%M:%S.%Z") - + return datetime.datetime.strftime(datetime.datetime.now(), "%Y%m%d_%H%M%S%Z") def create_dir_name(run_id, prefix, ftype): return os.path.dirname(create_file_name_without_extension(run_id, prefix, 1, ftype, create_directory=False))