Project

General

Profile

Revision 7d77632f src/utils.ml

View differences:

src/utils.ml
392 392
end
393 393

  
394 394
let get_date () =
395
  let tm = Unix.localtime (Unix.time ()) in
395
  let tm = Unix.localtime (Unix.time ()) in 
396 396
  let fmt = Format.str_formatter in
397
  let open Unix in
398
  let _ =
399
    Format.fprintf fmt
400
      "%i/%i/%i %ih%i:%i"
401
      tm.tm_year
402
      tm.tm_mon
403
      tm.tm_mday
404
      tm.tm_hour
405
      tm.tm_min
406
      tm.tm_sec
407
  in
397
  pp_date fmt tm;
398
  (* let open Unix in *)
399
  (* let _ = *)
400
  (*   Format.fprintf fmt *)
401
  (*     "%i/%i/%i %ih%i:%i" *)
402
  (*     tm.tm_year *)
403
  (*     tm.tm_mon *)
404
  (*     tm.tm_mday *)
405
  (*     tm.tm_hour *)
406
  (*     tm.tm_min *)
407
  (*     tm.tm_sec *)
408
  (* in *)
408 409
  Format.flush_str_formatter ()
409 410

  
410 411
(* Local Variables: *)

Also available in: Unified diff