Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAustin Schaffer <austin.schaffer@ryansg.com>2019-12-19 13:08:17 -0500
committerSchaffer, Austin <austin.schaffer@ryansg.com>2019-12-19 14:42:10 -0500
commit9f22db72fdbc4f74725b3560698689ffab1013e0 (patch)
treebaba73011c892e4d9292e2b235819ba4566b9f5f
parente2a9d17dc6e47c4df46f57904a886fbfcab71ed9 (diff)
downloadliza-9f22db72fdbc4f74725b3560698689ffab1013e0.tar.gz
liza-9f22db72fdbc4f74725b3560698689ffab1013e0.tar.bz2
liza-9f22db72fdbc4f74725b3560698689ffab1013e0.zip
[DEV-5312] Use milliseconds for timestamp
-rw-r--r--src/system/avro/V1MessageWriter.ts3
-rw-r--r--test/system/V1MessageWriterTest.ts2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/system/avro/V1MessageWriter.ts b/src/system/avro/V1MessageWriter.ts
index c6f491e..1d9a49c 100644
--- a/src/system/avro/V1MessageWriter.ts
+++ b/src/system/avro/V1MessageWriter.ts
@@ -103,11 +103,12 @@ export class V1MessageWriter implements MessageWriter
const event_id = this.DELTA_MAP[ delta.type ];
const start_date_ms = { "long": meta.startDate * 1000 };
const last_update_ms = { "long": meta.lastUpdate * 1000 };
+ const ts_ms = ts * 1000;
return {
event: {
id: event_id,
- ts: ts,
+ ts: ts_ms,
actor: 'SERVER',
step: null,
},
diff --git a/test/system/V1MessageWriterTest.ts b/test/system/V1MessageWriterTest.ts
index a0931c0..2debf9d 100644
--- a/test/system/V1MessageWriterTest.ts
+++ b/test/system/V1MessageWriterTest.ts
@@ -404,7 +404,7 @@ describe( 'system.V1MessageWriter', () =>
const expected = {
event: {
id: 'STEP_SAVE',
- ts: ts,
+ ts: ts * 1000,
actor: 'SERVER',
step: null,
},