diff --git a/package-lock.json b/package-lock.json index dca3abb3..0bc8e8c0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,7 +34,7 @@ "parse-duration": "^2.0.1", "pinia": "^3.0.0", "radix-vue": "^1.9.6", - "reka-ui": "^2.8.2", + "reka-ui": "2.8.2", "tailwind-merge": "^2.6.0", "tailwindcss-animate": "^1.0.7", "vue-echarts": "^8.0.0", @@ -6750,9 +6750,9 @@ } }, "node_modules/reka-ui": { - "version": "2.9.6", - "resolved": "https://registry.npmjs.org/reka-ui/-/reka-ui-2.9.6.tgz", - "integrity": "sha512-K6bL457owpvWONc7hsjFxo3HDC9s6IzhRqShW0w9JSKelPGfRbkHD558UQTn/NH1cvrXVHygKyC7fExFmRketg==", + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/reka-ui/-/reka-ui-2.8.2.tgz", + "integrity": "sha512-8lTKcJhmG+D3UyJxhBnNnW/720sLzm0pbA9AC1MWazmJ5YchJAyTSl+O00xP/kxBmEN0fw5JqWVHguiFmsGjzA==", "license": "MIT", "dependencies": { "@floating-ui/dom": "^1.6.13", @@ -6763,7 +6763,7 @@ "@vueuse/core": "^14.1.0", "@vueuse/shared": "^14.1.0", "aria-hidden": "^1.2.4", - "defu": "^6.1.5", + "defu": "^6.1.4", "ohash": "^2.0.11" }, "funding": { @@ -6771,7 +6771,7 @@ "url": "https://github.com/sponsors/zernonia" }, "peerDependencies": { - "vue": ">= 3.4.0" + "vue": ">= 3.2.0" } }, "node_modules/remove-accents": { diff --git a/package.json b/package.json index 93ef9840..d049f966 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "parse-duration": "^2.0.1", "pinia": "^3.0.0", "radix-vue": "^1.9.6", - "reka-ui": "^2.8.2", + "reka-ui": "2.8.2", "tailwind-merge": "^2.6.0", "tailwindcss-animate": "^1.0.7", "vue-echarts": "^8.0.0", diff --git a/resources/js/utils/timesheet/cellMath.ts b/resources/js/utils/timesheet/cellMath.ts index 92771531..3b098ca1 100644 --- a/resources/js/utils/timesheet/cellMath.ts +++ b/resources/js/utils/timesheet/cellMath.ts @@ -28,10 +28,14 @@ interface Interval { function localDayBounds(date: string, tz: string): { dayStart: Dayjs; dayEnd: Dayjs } { const dayjs = getDayJsInstance(); - const localDayStart = dayjs.tz(`${date} 00:00:00`, tz); + // `.add(1, 'day')` on a Dayjs instance advances by a fixed 24h, which is + // wrong on DST-transition days (the local day is 23h or 25h long). Derive + // the next calendar date in UTC (no DST) and take its local midnight, so + // `dayEnd` is always the real next local midnight. + const nextDate = dayjs.utc(date).add(1, 'day').format('YYYY-MM-DD'); return { - dayStart: localDayStart.utc(), - dayEnd: localDayStart.add(1, 'day').utc(), + dayStart: dayjs.tz(`${date} 00:00:00`, tz).utc(), + dayEnd: dayjs.tz(`${nextDate} 00:00:00`, tz).utc(), }; }