From 69f1eaadbbfb2d35a8434a63d862e7545d47a2d8 Mon Sep 17 00:00:00 2001 From: Thomas MESLIN <th.meslin@gmail.com> Date: Tue, 8 Apr 2025 04:10:53 +0200 Subject: [PATCH] Fixed date format --- makefile | 2 +- script/src/graph_export.ml | 31 +++---------------------------- 2 files changed, 4 insertions(+), 29 deletions(-) diff --git a/makefile b/makefile index efca59b..0e5edd2 100644 --- a/makefile +++ b/makefile @@ -13,7 +13,7 @@ $(caml_file): cd script/src;ocamlopt $@.ml -o ../bin/$@.exe $(caml_need_csv): - cd script/src;ocamlopt csv.ml $@.ml -o ../bin/$@.exe + cd script/src;ocamlopt unix.cmxa csv.ml $@.ml -o ../bin/$@.exe complete_compile: @echo "\nAll caml programs compiled !\n" diff --git a/script/src/graph_export.ml b/script/src/graph_export.ml index 25320e9..fc5dcc9 100644 --- a/script/src/graph_export.ml +++ b/script/src/graph_export.ml @@ -1,9 +1,10 @@ - let create_gexf path node_data edge_data = let oc = open_out path in - let date = "2025-04-08" in (*yyyy-mm-dd*) + let t = Unix.time () in + let tm = Unix.localtime t in + let date = Printf.sprintf "%4d-%02d-%02d" (tm.tm_year+1900) (tm.tm_mon+1) tm.tm_mday in (*yyyy-mm-dd*) (*Création de l'HEADER*) output_string oc "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; output_string oc @@ -97,29 +98,3 @@ end - - - - - - - - - - - - - - - - - - - - - - - - - - -- GitLab