master^2
Bhaskar 5 months ago
parent b386899f6a
commit d42184c984

@ -610,7 +610,7 @@ exports.assignTeamMemberToQuotation = async (request, reply) => {
const isGSMConnected = diffInMinutes <= 1; const isGSMConnected = diffInMinutes <= 1;
const gsmStatus = isGSMConnected ? "connected" : "disconnected"; const gsmStatus = isGSMConnected ? "connected" : "disconnected";
const gsmLastCheckTime = now.format("YYYY-MM-DD HH:mm:ss"); // formatted current time const gsmLastCheckTime = now.format("DD-MM-YYYY HH:mm:ss"); // formatted current time
// ✅ Step 1: Update Insensors with GSM date/time/status and last check time // ✅ Step 1: Update Insensors with GSM date/time/status and last check time
await Insensors.findOneAndUpdate( await Insensors.findOneAndUpdate(
@ -718,7 +718,7 @@ exports.getByHardwareAndTankId = async (req, reply) => {
} }
// ✅ Format LoRa last check time in "YYYY-MM-DD HH:mm:ss" // ✅ Format LoRa last check time in "YYYY-MM-DD HH:mm:ss"
lora_last_check_time = moment.tz("Asia/Kolkata").format("YYYY-MM-DD HH:mm:ss"); lora_last_check_time = moment.tz("Asia/Kolkata").format("DD-MM-YYYY HH:mm:ss");
updateFields.lora_last_check_time = lora_last_check_time; updateFields.lora_last_check_time = lora_last_check_time;
await Insensors.findOneAndUpdate( await Insensors.findOneAndUpdate(

Loading…
Cancel
Save