Skip to content

fix: use local date for call boundary checks#194

Merged
wolovim merged 2 commits intoethereum:mainfrom
0xWeakSheep:fix/local-date-boundary
Apr 2, 2026
Merged

fix: use local date for call boundary checks#194
wolovim merged 2 commits intoethereum:mainfrom
0xWeakSheep:fix/local-date-boundary

Conversation

@0xWeakSheep
Copy link
Copy Markdown
Contributor

Summary

This PR fixes date boundary logic that previously used UTC day strings (toISOString().split('T')[0]) for "today" comparisons.

Using UTC dates could shift day boundaries for users in non-UTC timezones, causing incorrect "past vs upcoming" classification near midnight local time.

Changes

  • Updated call navigation day comparison to use local date:
    • src/data/calls.ts
  • Updated upcoming call filtering day comparison to use local date:
    • src/utils/github.ts
  • Reused existing formatISODate(new Date()) utility for consistent local date formatting.

Why this is correct

Call dates in this project are compared as YYYY-MM-DD local calendar dates.
Using local date generation aligns "today" with user-local expectations and avoids UTC offset drift.

Validation

  • npm run -s lint
  • npm run -s build

Both commands pass locally.

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 29, 2026

Deploy Preview for eth-forkcast ready!

Name Link
🔨 Latest commit c363453
🔍 Latest deploy log https://app.netlify.com/projects/eth-forkcast/deploys/69ce93bf224cde0008fdca34
😎 Deploy Preview https://deploy-preview-194--eth-forkcast.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Collaborator

@dionysuzx dionysuzx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I manually verified the timezone boundary cases this patch targets, and the updated local-date comparison behaves correctly.

Copy link
Copy Markdown
Member

@wolovim wolovim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the contribution :)

@wolovim wolovim merged commit 67b9b5d into ethereum:main Apr 2, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants