Repository navigation
Description
Problem
Bounty.deadline and the derived countdown/urgency UI (likely on BountyCard.tsx and the bounty detail page, given Difficulty/status badges exist) render an ISO deadline string. Nothing in src/lib/utils.ts (per the README's description "currency/percent/date formatting") is confirmed to handle timezones correctly. Deadlines for on-chain escrow release are inherently a "wall clock across timezones" problem: a contributor in UTC+13 and a maintainer in UTC-8 need to see the same absolute deadline moment, but a naive new Date(deadline).toLocaleDateString() without explicit timezone/locale handling can render different calendar dates for each of them, and worse, if any part of the codebase does manual date-string parsing/arithmetic (e.g. new Date(deadline).getDate() - new Date().getDate() style day-difference math) rather than using proper duration libraries or UTC-safe arithmetic, deadline countdowns can be off by one near DST transitions or month boundaries.
Why this is hard
- Requires actually reading every date-handling function in
src/lib/utils.tsand every call site that rendersdeadline,createdAt-equivalents, or countdowns (bounty cards, bounty detail escrow status, milestone pages) to find naive arithmetic — this is a cross-cutting audit, not a single function fix. - No date library appears in
package.json(no date-fns, dayjs, luxon) — you need to decide whether to add a minimal dependency (weigh bundle size for a Next.js edge-rendered app) or write careful nativeIntl/UTC-safe helpers, and justify the choice. - "Time remaining" countdowns that update client-side (if any exist, e.g. a live "expires in 2h 14m" ticking display) need to handle the server-rendered initial value vs. client re-render consistently to avoid hydration mismatches — a naive
Date.now()call during SSR vs. hydration will produce a mismatch warning or a jumping countdown. - Must define and apply one consistent policy: display deadlines in the viewer's local timezone with the actual instant preserved (correct), not in a hardcoded UTC or server-timezone format that reads as "wrong" to non-UTC users.
Scope
- Audit all date rendering/arithmetic in
src/lib/utils.tsand its call sites for timezone-naive or DST-unsafe logic. - Introduce a small, justified date-handling dependency or a well-tested native
Intl-based helper set. - Fix all countdown/deadline displays to use viewer-local rendering of an absolute instant, consistently.
- Fix any hydration-mismatch risk in live-updating countdown components.
- Add unit tests around DST transition dates and month/year boundaries.
Acceptance criteria
- A fixed deadline instant renders the correct relative "time remaining" and correct calendar date regardless of the viewing browser's timezone, verified with at least three simulated timezones (UTC, UTC+13, UTC-8).
- No hydration mismatch warnings from any countdown component.
Activity
Joseph-1-Duro commentedon Aug 25, 2026
@Joseph-1-Duro has applied to work on this issue as part of the Stellar Wave Program's 8th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Joseph-1-Duro to this issue.
oldtaker24 commentedon Aug 25, 2026
@oldtaker24 has applied to work on this issue as part of the Stellar Wave Program's 8th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @oldtaker24 to this issue.
drips-wave commentedon Aug 25, 2026
Congratulations, @oldtaker24! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on August 31, 2026.
🧑💻 @oldtaker24: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.
Warning
When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.
🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.
🌊 Happy Wave 🌊
feat: DST-safe deadlines, ARIA tabs, error boundaries, request dedup
grantfox-oss commentedon Aug 25, 2026
🎉 This issue has been marked as completed on GrantFox as part of the Third Campaign campaign!
@oldtaker24's PR #336 was approved and merged by @chonilius.
🏆 @oldtaker24: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (48 total points). Track your full progress on GrantFox.
👏 Great work, @oldtaker24! Keep contributing to MergeFi.
drips-wave commentedon Aug 25, 2026
This issue has been completed by @oldtaker24 as part of the Stellar Wave Program's 8th Wave 🥳
😎 @oldtaker24: You earned 200 Points for completing this issue! After the current Wave ends, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.
🧑💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.