fleetmap-reports 1.0.997 → 1.0.998
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/util/traccar.js +2 -2
package/package.json
CHANGED
package/src/util/traccar.js
CHANGED
|
@@ -135,13 +135,13 @@ async function getSummaryByDay (dates, userData, traccarInstance, allDevices, ig
|
|
|
135
135
|
for (const [index, date] of dates.entries()) {
|
|
136
136
|
let startDateLocal = new Date(convertFromUTC(date, userData.user.attributes.timezone).toISOString().split('T')[0] + ' ' + userData.dayHours.startTime)
|
|
137
137
|
if (index === 0) {
|
|
138
|
-
const _startDateLocal = new Date(convertFromUTC(date, userData.user.attributes.timezone).toISOString().split('T')[0] + ' ' + from.toTimeString())
|
|
138
|
+
const _startDateLocal = new Date(convertFromUTC(date, userData.user.attributes.timezone).toISOString().split('T')[0] + ' ' + from.toTimeString().slice(0, 8))
|
|
139
139
|
startDateLocal = startDateLocal.getTime() > _startDateLocal.getTime() ? startDateLocal : _startDateLocal
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
let endDateLocal = new Date(convertFromUTC(date, userData.user.attributes.timezone).toISOString().split('T')[0] + ' ' + userData.dayHours.endTime)
|
|
143
143
|
if (index === dates.length - 1) {
|
|
144
|
-
const _endDateLocal = new Date(convertFromUTC(date, userData.user.attributes.timezone).toISOString().split('T')[0] + ' ' + to.toTimeString())
|
|
144
|
+
const _endDateLocal = new Date(convertFromUTC(date, userData.user.attributes.timezone).toISOString().split('T')[0] + ' ' + to.toTimeString().slice(0, 8))
|
|
145
145
|
endDateLocal = endDateLocal.getTime() < _endDateLocal.getTime() ? endDateLocal : _endDateLocal
|
|
146
146
|
}
|
|
147
147
|
|