# HG changeset patch # User Thomas Gazagnaire # Date 1260355967 0 # Node ID 5f26cdb61a6b90a1c4e8da3126ae6f01b1de7c44 # Parent bc11307f04da676e5353ec51393f2daa2da3d2f2 [oxenstored] Use iso8601-like string format and GMT timezone in xenstored-access.log Signed-off-by: Thomas Gazagnaire diff -r bc11307f04da -r 5f26cdb61a6b ocaml/xenstored/logging.ml --- a/ocaml/xenstored/logging.ml Wed Dec 09 10:52:46 2009 +0000 +++ b/ocaml/xenstored/logging.ml Wed Dec 09 10:52:47 2009 +0000 @@ -46,9 +46,9 @@ let string_of_date () = let time = Unix.gettimeofday () in - let tm = Unix.localtime time in + let tm = Unix.gmtime time in let msec = time -. (floor time) in - sprintf "%d%.2d%.2d %.2d:%.2d:%.2d.%.3d" (1900 + tm.Unix.tm_year) + sprintf "%d%.2d%.2dT%.2d:%.2d:%.2d.%.3dZ" (1900 + tm.Unix.tm_year) (tm.Unix.tm_mon + 1) tm.Unix.tm_mday tm.Unix.tm_hour