- time_t t = json_integer(date);
- char *s = xastrftime(" %Y-%m-%d %H:%M:%S", t, 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);