ovsdb-server: Document that --remote may be used multiple times.
[sliver-openvswitch.git] / ovsdb / ovsdb-tool.c
index 8670127..11e61e6 100644 (file)
@@ -40,8 +40,6 @@
 #include "util.h"
 #include "vlog.h"
 
-VLOG_DEFINE_THIS_MODULE(ovsdb_tool);
-
 /* -m, --more: Verbosity level for "show-log" command output. */
 static int show_log_verbosity;
 
@@ -518,9 +516,15 @@ do_show_log(int argc, char *argv[])
 
             date = shash_find_data(json_object(json), "_date");
             if (date && date->type == JSON_INTEGER) {
-                time_t t = json_integer(date);
-                char *s = xastrftime_msec(" %Y-%m-%d %H:%M:%S",
-                                          t * 1000LL, true);
+                long long int t = json_integer(date);
+                char *s;
+
+                if (t < INT32_MAX) {
+                    /* Older versions of ovsdb wrote timestamps in seconds. */
+                    t *= 1000;
+                }
+
+               s = xastrftime_msec(" %Y-%m-%d %H:%M:%S.###", t, true);
                 fputs(s, stdout);
                 free(s);
             }