changed date string to iso

This commit is contained in:
unknown
2024-10-27 11:19:42 +03:00
parent c626058b56
commit 0579483444
2 changed files with 3 additions and 1 deletions
@@ -197,7 +197,7 @@ export class DeviceStatusFirebaseService {
eventId: addDeviceStatusDto.log.dataId,
eventTime: new Date(
addDeviceStatusDto.log.properties[0].time,
).toLocaleDateString(),
).toISOString(),
});
await this.deviceStatusLogRepository.save(newLog);
// Save the updated data to Firebase
@@ -37,6 +37,8 @@ export class TuyaWebSocketService {
this.client.message(async (ws: WebSocket, message: any) => {
try {
console.log(message.payload.data.bizData);
await this.deviceStatusFirebaseService.addDeviceStatusToFirebase({
deviceTuyaUuid: message.payload.data.bizData.devId,
status: message.payload.data.bizData.properties,