Commit f7c928e
fix: parse holiday date strings as local time to prevent timezone shift
When holiday dates are provided as ISO date strings (YYYY-MM-DD), the
previous implementation used `new Date(string)` which parses them as UTC
midnight. This caused holidays to display on the wrong day in timezones
west of UTC.
For example, "2025-01-01" would be parsed as 2025-01-01T00:00:00.000Z,
which when formatted in PST (UTC-8) becomes December 31st, 2024.
This fix uses the existing `parseDate` utility with the ISO format,
which uses date-fns's `parse` function that treats dates as local time.
Fixes #6105
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 8279f2f commit f7c928e
2 files changed
+38
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
| 413 | + | |
| 414 | + | |
413 | 415 | | |
414 | 416 | | |
415 | | - | |
416 | | - | |
| 417 | + | |
| 418 | + | |
417 | 419 | | |
418 | 420 | | |
419 | 421 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5461 | 5461 | | |
5462 | 5462 | | |
5463 | 5463 | | |
| 5464 | + | |
| 5465 | + | |
| 5466 | + | |
| 5467 | + | |
| 5468 | + | |
| 5469 | + | |
| 5470 | + | |
| 5471 | + | |
| 5472 | + | |
| 5473 | + | |
| 5474 | + | |
| 5475 | + | |
| 5476 | + | |
| 5477 | + | |
| 5478 | + | |
| 5479 | + | |
| 5480 | + | |
| 5481 | + | |
| 5482 | + | |
| 5483 | + | |
| 5484 | + | |
| 5485 | + | |
| 5486 | + | |
| 5487 | + | |
| 5488 | + | |
| 5489 | + | |
| 5490 | + | |
| 5491 | + | |
| 5492 | + | |
| 5493 | + | |
| 5494 | + | |
| 5495 | + | |
| 5496 | + | |
| 5497 | + | |
5464 | 5498 | | |
5465 | 5499 | | |
5466 | 5500 | | |
| |||
0 commit comments