fleetmap-reports 1.0.733 → 1.0.734

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetmap-reports",
3
- "version": "1.0.733",
3
+ "version": "1.0.734",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -2,6 +2,7 @@ const { getReports } = require('./index')
2
2
  const assert = require('assert')
3
3
  // eslint-disable-next-line no-undef
4
4
  describe('zones', function () {
5
+ this.timeout(500000)
5
6
  // eslint-disable-next-line no-undef
6
7
  it('works with ellca', async () => {
7
8
  const report = await getReports()
package/src/util/utils.js CHANGED
@@ -110,7 +110,8 @@ function getDates (startDate, endDate, timezone) {
110
110
  const dates = []
111
111
  let currentDate = new Date(startDate.getFullYear(), startDate.getMonth(), startDate.getDate(), 12, 0, 0, 0)
112
112
  if (!isClientSide() && timezone) {
113
- currentDate = convertFromUTC(currentDate, timezone)
113
+ const startDateUserTimezone = convertFromUTC(startDate, timezone)
114
+ currentDate = new Date(startDateUserTimezone.getFullYear(), startDateUserTimezone.getMonth(), startDateUserTimezone.getDate(), 12, 0, 0, 0)
114
115
  }
115
116
  const addDays = function (days) {
116
117
  const date = new Date(this.valueOf())