Skip to content

fix(chores): a display in another time zone shows the household's chore day - #318

Merged
jherforth merged 1 commit into
jherforth:mainfrom
mrramam:fix/chore-day-household-zone
Oct 23, 2026
Merged

jherforth merged 1 commit into
jherforth:mainfrom
mrramam:fix/chore-day-household-zone

Conversation

@mrramam

@mrramam mrramam commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

A display whose browser is in another time zone than the household now shows the household's chore day. Details in mrramam#68.

shouldShowChoreToday read the crontab in the household zone but compared it against midnight in the browser's zone. When the two are on different dates, chores set for chosen weekdays show on the wrong day: with the household on Los Angeles and a browser on Tokyo time on a Friday evening, Friday's chores disappear and Saturday's show. The chore sounds and the bonus gate (hasOutstandingBonusChore) follow the same wrong day, so the widget can disagree with the server's daily bonus. Every-day chores were never affected.

  • shouldShowChoreToday matches the crontab against the household's date (getTodayDateString) with cronFiresOn from choreDays.js, the calendar match the chore history row already uses and the server's cronFiresOnDate mirrors. hasOutstandingBonusChore passes its today.
  • isVacationModeActiveToday defaults today to the household's date, so vacation starts and ends on the household's day.
  • Until /api/timezone answers, the client assumes the browser's own zone instead of America/New_York.

Tests put the browser and the household on either side of midnight, both ways. Three timezone.test.js cases now expect the browser-zone fallback.

On our hg-dev and production. We checked it with a browser on Tokyo time against a Los Angeles household: the fixed build shows the same chores as a Los Angeles browser, and the old one showed Saturday's.

…re day

shouldShowChoreToday read the crontab in the household zone but compared
it against midnight in the browser's zone. When the two zones are on
different dates, a chore set for chosen weekdays showed on the wrong
day: with the household on UTC and a browser in Los Angeles, a
Monday-only chore showed all Sunday evening. The chore sounds and the
daily bonus gate (hasOutstandingBonusChore) followed the same wrong day,
so the widget could disagree with the server's bonus.

- shouldShowChoreToday matches the crontab against the household's date
  (getTodayDateString) with cronFiresOn from choreDays.js, the calendar
  match the chore history row already uses and the server's
  cronFiresOnDate mirrors. hasOutstandingBonusChore passes its today.
- isVacationModeActiveToday defaults today to the household's date, not
  the browser's, so vacation starts and ends on the household's day.
- Until /api/timezone answers, the client assumes the browser's own zone
  instead of America/New_York.

Every-day chores were never affected. Tests set the browser and the
household zones on either side of midnight, both ways.
@jherforth
jherforth merged commit 7f21e8a into jherforth:main Oct 23, 2026
3 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in HomeGlow Kanban Oct 23, 2026
@mrramam
mrramam deleted the fix/chore-day-household-zone branch October 23, 2026 19:24
adamecker pushed a commit to adamecker/HomeGlow that referenced this pull request Oct 24, 2026
…e 1.10 jherforth#321, plugin storage/proxy fixes jherforth#319, chore timezone display jherforth#318, CI pins jherforth#316-317, prize descriptions jherforth#315, proxmox/docker fixes jherforth#314, plugin proxy docs jherforth#313, Google OAuth escaping jherforth#312, upload typing/sandbox jherforth#311

Resolve registry conflict: keep fork renumbering (local 28 userGoogleTasks, 34 googleTasksTables); upstream's new 35 proxyWhitelistSeed and 36 prizeDescription renumbered to 41 and 42 to keep schemaIds unique and matching file names.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants