bug: Align historical year ranges to user timezone offsets#5338
Conversation
|
@MasterJi27 is attempting to deploy a commit to the jhasourav07's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
🚨 Hey @MasterJi27, the CI Pipeline is failing on this PR and it has been marked as Please fix the issues before this can be reviewed. Here's how: 1. Run checks locally before pushing: npm run format:check # Check Prettier formatting
npm run lint # Run ESLint
npm run typecheck # TypeScript type check
npm run test # Run unit tests (Vitest)
npm run build # Verify production build passes2. Auto-fix common issues: npm run format # Auto-fix formatting with Prettier
npm run lint -- --fix # Auto-fix lint errors where possible3. Check the full failure log here: Once you push a fix and the CI passes, the |
Aamod-Dev
left a comment
There was a problem hiding this comment.
Great work! Timezone offsets are notoriously tricky to handle without heavy external libraries, but your use of Intl.DateTimeFormat to parse parts and calculate the offset milliseconds is very clever and lightweight.
The tests verifying the offset against Honolulu timezone perfectly validate the boundaries.
Labels Applied:
- level:intermediate: Timezone offset calculation using Intl parsing is moderately complex.
- type:bug: Fixes issue #5259 with year bounds.
- quality:clean: Clean, native implementation without adding heavy dependencies, and includes tests.
- gssoc:approved
- mentor:Aamod007
|
Hi @sauravjha, @Aamod007 all required checks have passed and the PR has been approved. The remaining Vercel check appears to require team authorization. Could you please review and merge when convenient? Thanks |
26dd562 to
ccc4ff8
Compare
82c8e1e to
9df19bc
Compare
9df19bc to
d0c2417
Compare
|
🎉 Congratulations @MasterJi27! Your PR has been successfully merged. 🚀 Thank you for contributing to CommitPulse. Your work helps us build a better tool for the community.
Keep building! 💻✨ |
Resolves #5259. Aligns the query bounds from and to parameter values with timezone offset boundaries by converting local midnight and local end-of-day timestamps to UTC when fetching historical year contribution calendars.