10
1
mirror of https://gitlab.com/scemama/qmcchem.git synced 2024-12-22 04:13:31 +01:00

Seems to work again

This commit is contained in:
Anthony Scemama 2019-07-23 17:34:58 +02:00
parent 380169d219
commit f7ffed3a5a
2 changed files with 5 additions and 5 deletions

View File

@ -150,7 +150,7 @@ let raw_data ?(locked=true) () =
let properties = lazy ( let properties = lazy (
let h = Hashtbl.create 63 in let h = Hashtbl.create 63 in
List.iter (fun x -> 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 ()); (raw_data ());
Hashtbl.fold (fun k v a -> v :: a) h [] Hashtbl.fold (fun k v a -> v :: a) h []
) )

View File

@ -10,15 +10,15 @@ let to_sec t =
sec + sec +
min * 60 + min * 60 +
hour * 60 * 60 + hour * 60 * 60 +
mday * 60 * 60 * 24 (mday-1) * 60 * 60 * 24
let string_of_t t = 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 let sec = t.Unix.tm_sec
and min = t.Unix.tm_min and min = t.Unix.tm_min
and hour = t.Unix.tm_hour + 24*mday and hour = t.Unix.tm_hour + 24*mday
in 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 string_of_date t =
let year = 1900 + t.Unix.tm_year in 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" | 8 -> "Sep" | 9 -> "Oct" | 10 -> "Nov" | 11 -> "Dec"
| _ -> assert false | _ -> assert false
in 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 () = let string_of_now () =