From f7ffed3a5a64595d2efadcf4b7d14b056361083e Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 23 Jul 2019 17:34:58 +0200 Subject: [PATCH] Seems to work again --- ocaml/Block.ml | 2 +- ocaml/Time.ml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ocaml/Block.ml b/ocaml/Block.ml index 1e0ebe7..6de510b 100644 --- a/ocaml/Block.ml +++ b/ocaml/Block.ml @@ -150,7 +150,7 @@ let raw_data ?(locked=true) () = let properties = lazy ( let h = Hashtbl.create 63 in List.iter (fun x -> - Hashtbl.add h (Property.to_string x.property) x.property) + Hashtbl.replace h (Property.to_string x.property) x.property) (raw_data ()); Hashtbl.fold (fun k v a -> v :: a) h [] ) diff --git a/ocaml/Time.ml b/ocaml/Time.ml index ec4a320..8bc5afb 100644 --- a/ocaml/Time.ml +++ b/ocaml/Time.ml @@ -10,15 +10,15 @@ let to_sec t = sec + min * 60 + hour * 60 * 60 + - mday * 60 * 60 * 24 + (mday-1) * 60 * 60 * 24 let string_of_t t = - let mday = t.Unix.tm_mday in + let mday = t.Unix.tm_mday - 1 in let sec = t.Unix.tm_sec and min = t.Unix.tm_min and hour = t.Unix.tm_hour + 24*mday in - Printf.sprintf "%2d:%2d:%2d" hour min sec + Printf.sprintf "%2d:%2.2d:%2.2d" hour min sec let string_of_date t = let year = 1900 + t.Unix.tm_year in @@ -35,7 +35,7 @@ let string_of_date t = | 8 -> "Sep" | 9 -> "Oct" | 10 -> "Nov" | 11 -> "Dec" | _ -> assert false in - Printf.sprintf "%2d %3s %4d - %2.2d:%2.2d:%2.2d" mday month year hour min sec + Printf.sprintf "%2d %3s %4d - %2d:%2.2d:%2.2d" mday month year hour min sec let string_of_now () =