From 1ff1065c32df20a751c3d33cf2f67b798c5cf119 Mon Sep 17 00:00:00 2001 From: Paul Ingram Date: Fri, 13 Sep 2013 18:52:54 -0700 Subject: ovsdb: write commit timestamps to millisecond resolution. This is expected to make system debugging easier. This raises two compatibility issues: 1. When a new ovsdb-tool reads an old database, it will multiply by 1000 any timestamp it reads which is less than 1<<31. Since this date corresponds to Jan 16 1970 this is unlikely to cause a problem. 2. When an old ovsdb-tool reads a new database, it will interpret the millisecond timestamps as seconds and report dates in the far future; the time of this commit is reported as the year 45672 (each second since the epoch is interpreted as 16 minutes). Signed-off-by: Paul Ingram Signed-off-by: Ben Pfaff --- ovsdb/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ovsdb/file.c') diff --git a/ovsdb/file.c b/ovsdb/file.c index 4ccf33e72..7c8ac6f29 100644 --- a/ovsdb/file.c +++ b/ovsdb/file.c @@ -768,7 +768,7 @@ ovsdb_file_txn_commit(struct json *json, const char *comment, if (comment) { json_object_put_string(json, "_comment", comment); } - json_object_put(json, "_date", json_integer_create(time_wall())); + json_object_put(json, "_date", json_integer_create(time_wall_msec())); error = ovsdb_log_write(log, json); json_destroy(json); -- cgit v1.2.1