Repository navigation
fix(ios): a box on UTC keeps its goals on UTC - #136
Merged
Merged
Conversation
The box plans a goal's ready time on its own clock. On a box whose host names no zone that clock is UTC, so 17:00 is 17:00 UTC, 18:00 in Stockholm in winter. The app read a box zone of UTC as no zone and showed the goal on the phone's clock: "100 % by 17:00 on Sun" above "Next: tomorrow 18:00". The household clock is now the box's whenever it names a zone, UTC included. When it is UTC and the phone's is not, the goal says "17:00 UTC" and the next deadline says FTW's clock is set to UTC. Needs srcfl/ftw's localzone fix, which stops Core saying UTC for a clock that is not. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Oct 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Erik (iPhone 16 Pro, app 0.6.3) set his car's goal to 100 % by 17:00 on Sunday 1 November. The car view read "100 % by 17:00 on Sun" with "Next: tomorrow 18:00" under it.
His box runs on UTC. Core plans a goal's clock (
ready_by_min,time_of_day_min) on the box's clock, so 17:00 is 17:00 UTC, 18:00 in Stockholm in winter. "Next" shows the box's real deadline. The goal line was the one that was wrong:EVText.householdZoneread a box zone ofUTC/Etc/UTCas "no zone" and used the phone's clock. The goal and the editor then showed and sent 17:00 on Stockholm's clock, and the box read the same number as UTC. The protocol saysreadyByMinis in the box's zone.Change
householdZoneuses the box's zone whenever it names one, UTC included. It falls back to the phone only fornil,"",Localor a name the phone cannot load.Calendar.household(widgets, savings, grid today) already did this, so the two now agree.17:00 UTCand the next deadline saysNext: tomorrow 17:00 UTC. FTW's clock is set to UTC.(Swedish:Nästa gång: i morgon 17:00 UTC. FTW:s klocka går på UTC.). Both strings live inEV.swift.CarView.swiftandCarFirst.swiftare untouched; fix(ios): the car's goal on the first screen, and a plan that scrolls #134 is reworking them.Paired with srcfl/ftw#1945. Core said UTC for some clocks that were not, e.g. a Docker box that mounts the host's
/etc/localtimeover Debian'sEtc/UTClink. That is why the app distrusted UTC. Merge srcfl/ftw#1945 first. Until a box runs that fix, a Docker box with the host's localtime mounted will show its goals and plan times an hour or two off here.Evidence
CarTests.aBoxOnUTCSaysItsGoalIsInUTCis Erik's case: boxEtc/UTC, phone Stockholm,time_of_day_min1020,target_time2026-11-01T17:00Z. Before the change it fails with 4 issues: the goal reads17:00 on Sunand next reads18:00.theHouseholdZoneIsTheBoxsWhenItNamesOnenow expects UTC forUTCandEtc/UTC.swift testinappleApp/FTWKit: 636 tests in 95 suites pass locally.CarTests.swift.What changes for an owner on a UTC box
Every time in the app (plan text, chart axes, goal) now follows the box's UTC clock. Before, plan times were on the phone's clock and goals were silently an hour or two off. Only the goal lines say "UTC". The fix for the owner is to give the box their zone (
TZ), which this PR does not do.🤖 Generated with Claude Code