From 758df7e783e2d056186cd767daf707a98392b10a Mon Sep 17 00:00:00 2001 From: Miguel Matey Sanz Date: Wed, 11 May 2022 09:52:24 +0200 Subject: [PATCH] Change timestamp type from Date to real timestamp --- .../heart-rate/android/record-messaging-service.android.ts | 2 +- .../location/android/record-messaging-service.android.ts | 2 +- src/internal/sensors/sensor-record.ts | 2 +- .../triaxial/triaxial-record-messaging-service.android.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/internal/sensors/heart-rate/android/record-messaging-service.android.ts b/src/internal/sensors/heart-rate/android/record-messaging-service.android.ts index 22429ee..da7f668 100644 --- a/src/internal/sensors/heart-rate/android/record-messaging-service.android.ts +++ b/src/internal/sensors/heart-rate/android/record-messaging-service.android.ts @@ -19,7 +19,7 @@ export class HeartRateRecordMessagingService extends AbstractRecordMessagingServ records.push({ deviceId: messageEvent.getSourceNodeId(), - timestamp: new Date(time), + timestamp: time, value, }); } diff --git a/src/internal/sensors/location/android/record-messaging-service.android.ts b/src/internal/sensors/location/android/record-messaging-service.android.ts index abc45f0..c7e50e8 100644 --- a/src/internal/sensors/location/android/record-messaging-service.android.ts +++ b/src/internal/sensors/location/android/record-messaging-service.android.ts @@ -21,7 +21,7 @@ export class LocationRecordMessagingService extends AbstractRecordMessagingServi records.push({ deviceId: messageEvent.getSourceNodeId(), - timestamp: new Date(time), + timestamp: time, latitude: lat, longitude: lon, altitude: alt, diff --git a/src/internal/sensors/sensor-record.ts b/src/internal/sensors/sensor-record.ts index c04ca35..e64826c 100644 --- a/src/internal/sensors/sensor-record.ts +++ b/src/internal/sensors/sensor-record.ts @@ -2,7 +2,7 @@ import { SensorType } from "./sensor-type"; export interface SensorRecord { deviceId: string; - timestamp: Date; + timestamp: number; } export interface SensorRecords { diff --git a/src/internal/sensors/triaxial/triaxial-record-messaging-service.android.ts b/src/internal/sensors/triaxial/triaxial-record-messaging-service.android.ts index 22c8b04..2f4b399 100644 --- a/src/internal/sensors/triaxial/triaxial-record-messaging-service.android.ts +++ b/src/internal/sensors/triaxial/triaxial-record-messaging-service.android.ts @@ -20,7 +20,7 @@ export class TriAxialRecordMessagingService extends AbstractRecordMessagingServi time = buff.getLong(); records.push({ deviceId: messageEvent.getSourceNodeId(), - timestamp: new Date(time), + timestamp: time, x, y, z,