# HG changeset patch
# User Thomas Gazagnaire <[email protected]>
# 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 <[email protected]>

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
1 file changed, 2 insertions(+), 2 deletions(-)
ocaml/xenstored/logging.ml |    4 ++--


# HG changeset patch
# User Thomas Gazagnaire <[email protected]>
# 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 <[email protected]>

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
_______________________________________________
xen-api mailing list
[email protected]
http://lists.xensource.com/mailman/listinfo/xen-api

Reply via email to