IO-1708 Remove timezone from date fields on server calcuations.

This commit is contained in:
Patrick Fic
2022-02-09 16:29:16 -08:00
parent 4c70351429
commit f8695972a3
5 changed files with 15 additions and 12 deletions

View File

@@ -716,7 +716,7 @@ async function InsertDmsVehicle(socket) {
dealerNumber: socket.JobData.bodyshop.cdk_dealerid,
...(socket.txEnvelope.inservicedate && {
inServiceDate: moment(socket.txEnvelope.inservicedate)
.tz(socket.JobData.bodyshop.timezone)
//.tz(socket.JobData.bodyshop.timezone)
.startOf("day")
.toISOString(),
}),
@@ -725,7 +725,7 @@ async function InsertDmsVehicle(socket) {
manufacturer: {},
vehicle: {
deliveryDate: moment()
.tz(socket.JobData.bodyshop.timezone)
// .tz(socket.JobData.bodyshop.timezone)
.format("YYYYMMDD"),
licensePlateNo: socket.JobData.plate_no,
make: socket.txEnvelope.dms_make,
@@ -854,14 +854,14 @@ async function UpdateDmsVehicle(socket) {
socket.DMSVeh.dealer.inServiceDate ||
socket.txEnvelope.inservicedate
)
.tz(socket.JobData.bodyshop.timezone)
// .tz(socket.JobData.bodyshop.timezone)
.toISOString(),
}),
},
vehicle: {
...socket.DMSVeh.vehicle,
deliveryDate: moment(socket.DMSVeh.vehicle.deliveryDate)
.tz(socket.JobData.bodyshop.timezone)
//.tz(socket.JobData.bodyshop.timezone)
.toISOString(),
},
owners: ids,