Draft
Fix date offset bugs in calendar drag&drop and task creation#1
Conversation
Deploying pliny-v2 with
|
| Latest commit: |
2b3d59a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://dc229ffc.pliny-v2.pages.dev |
| Branch Preview URL: | https://copilot-fix-9ee53632-be58-46.pliny-v2.pages.dev |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
pliny-v2 | 2b3d59a | Jul 01 2025, 03:59 AM |
Co-authored-by: bata-san <140896603+bata-san@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] カレンダーの日付オフセットバグを修正
Fix date offset bugs in calendar drag&drop and task creation
Jul 1, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The application had date offset bugs where tasks were being created 1 day earlier than intended in two scenarios:
Root Cause
The issue was caused by timezone handling problems when converting between JavaScript Date objects and date strings:
When Date objects are created from date-only strings (like "2024-01-15"), JavaScript interprets them as UTC midnight. In timezones behind UTC, calling
toISOString()would shift the date to the previous day.Solution
Added timezone-safe utility functions and updated all date handling code:
New Utility Functions
Fixed Functions
Calendar Drag & Drop:
Task Creation:
Calendar Rendering:
Testing
Created comprehensive tests covering:
All tests pass, confirming the fixes work correctly across different timezones without breaking existing functionality.
Impact
Fixes #[issue-number] (カレンダーの日付オフセットバグ修正)
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.