Skip to content

Hire date displays one day early (UTC-midnight parse rendered in local time) #151

Closed

Description

@matthewod11-stack

Description

An employee hire_date stored as 2023-05-15 renders as "May 14, 2023" in the detail panel. Classic date-only bug: new Date('2023-05-15') parses as UTC midnight, which is the previous day in any negative-offset timezone (observed in PDT, 2026-07-14, during People Map T10 verification).

Current State

hire_date is a TEXT ISO date in SQLite. Somewhere in the employee detail rendering the date-only string goes through a Date parse + locale formatter, shifting it back a day. Tenure math may be off by a day too wherever the same parse is used.

Suggested Fix

  • grep the frontend for new Date( applied to date-only fields (hire_date, review_date, termination_date)
  • Format date-only strings without a TZ round-trip (split the ISO string, or parse with an explicit local constructor new Date(y, m-1, d))
  • Audit other date-only surfaces (reviews list, work anniversaries digest) for the same pattern

Verification

  • npm test passes (add a case: '2023-05-15' renders as May 15, 2023 regardless of TZ)
  • npx tsc --noEmit clean
  • Dev app: fixture-emp-maya (hired 2023-05-15) shows May 15, 2023

Automation Hints

scope: src/components/, src/lib/
do-not-touch: src-tauri/
approach: extract-and-move
risk: low
max-files-changed: 6
blocked-by: none
bail-if: dates are shifted at write time (DB values wrong) rather than render time

Priority

Medium

Activity

  1. matthewod11-stack commented on Jul 15, 2026

    @matthewod11-stack
    OwnerAuthor

    Orchestrator opened PR: #152 (nightly run 2026-07-15). Left open for review — not auto-merge-eligible (approach extract-and-move is outside the auto_merge safe_approaches set).

  2. added a commit that references this issue on Jul 15, 2026
  3. added a commit that references this issue on Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech-debtEligible for automated overnight fixing

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions