diff --git a/xC-proto b/xC-proto index 526cd0f..54ca6b8 100644 --- a/xC-proto +++ b/xC-proto @@ -71,7 +71,7 @@ struct EventMessage { PART, ACTION, } rendition; - // Unix timestamp in seconds. + // Unix timestamp in milliseconds. u64 when; // Broken-up text, with in-band formatting. union ItemData switch (enum Item { diff --git a/xC.c b/xC.c index 082b9fe..af2adbd 100644 --- a/xC.c +++ b/xC.c @@ -3105,7 +3105,7 @@ relay_prepare_buffer_line (struct app_context *ctx, struct buffer *buffer, e->is_unimportant = !!(line->flags & BUFFER_LINE_UNIMPORTANT); e->is_highlight = !!(line->flags & BUFFER_LINE_HIGHLIGHT); e->rendition = 1 + line->r; - e->when = line->when; + e->when = line->when * 1000; size_t len = 0; for (size_t i = 0; line->items[i].type; i++) diff --git a/xP/public/xP.js b/xP/public/xP.js index c0dba93..f21683c 100644 --- a/xP/public/xP.js +++ b/xP/public/xP.js @@ -196,7 +196,7 @@ let Buffer = { let lastDateMark = undefined b.lines.forEach(line => { - let date = new Date(line.when * 1000) + let date = new Date(line.when) let dateMark = date.toLocaleDateString() if (dateMark !== lastDateMark) { lines.push(m('.date', {}, dateMark))