FiCl Dev Blog한국어

[PR #258·259] Fixing Review Findings Separately: New Records on Switched-Off Devices, and Dates and Times That Drifted

Work completed 2026-11-22 03:42 KST · Published 2026-11-22 13:23 KST · AI model used for the work Claude Opus 5.5, Claude Sonnet 5.5

[PR #258·259] Fixing Review Findings Separately: New Records on Switched-Off Devices, and Dates and Times That DriftedSummary. Blocking only new records on switched-off devices while keeping edits of older records and resends, response code 400 to match errors of the same kind, a future time that could be picked on Android, dates off by a day because of the phone time zone, and deleting TZ on Windows not bringing the time zone backPR #258·259Fixing Review Findings SeparatelySwitched-off devices, and drifting dates and timesI decided to fix themClaude: tests, buildCodex: tests, build1New records, device offOnly new device input and refillare rejectedEditing older records still worksResending a request still works2Response code 400Other "in use no more" errorsare all 400The lead session first said '409'I confirmed 4003Future time on AndroidThe time picker had no limitValues later than now are refusedExactly now is accepted4Date off by a dayIt passed midnight in KoreaNow noon in the phone time zoneTested in UTC and US WestTime zone testsClaude made a test environment change the process time zone per test fileReview finding: on Windows, deleting TZ does not restore the zoneKeyWhen a rule changes, first find tests of the old rule.Save the time zone before changing it and restore that value.FiCl Dev Blog · Post summary figure
[PR #258·259] Fixing Review Findings Separately: New Records on Switched-Off Devices, and Dates and Times That DriftedSummary. Blocking only new records on switched-off devices while keeping edits of older records and resends, response code 400 to match errors of the same kind, a future time that could be picked on Android, dates off by a day because of the phone time zone, and deleting TZ on Windows not bringing the time zone backPR #258·259Fixing Review Findings SeparatelySwitched-off devices, and drifting dates and timesI decided to fix themClaude: tests, buildCodex: tests, build1New records, device offOnly new device input and refillare rejectedEditing older records still worksResending a request still works2Response code 400Other "in use no more" errorsare all 400The lead session first said '409'I confirmed 4003Future time on AndroidThe time picker had no limitValues later than now are refusedExactly now is accepted4Date off by a dayIt passed midnight in KoreaNow noon in the phone time zoneTested in UTC and US WestTime zone testsClaude made a test environment change the process time zone per test fileReview finding: on Windows, deleting TZ does not restore the zoneKeyWhen a rule changes, first find tests of the old rule.Save the time zone before changing it and restore that value.FiCl Dev Blog · Post summary figure

These two PRs fix findings that came out of reviews of earlier PRs. PR 258 fixes switched-off devices still collecting new records, and PR 259 fixes two ways dates and times drifted when picked in the customer app. I decided on 2026-11-22 to make both fixes and put that in the decision log.

PR What was wrong Cause What changed
258 Switched-off devices still collected new device input and refill records The server did not check whether the device was switched off Only new records are rejected with 400; edits of older records and resends of the same request work as before
259 A future time could be picked on Android Only the date picker had a “today” limit; the time picker had none Values later than now are refused, with a notice
259 Dates shifted by a day when the phone’s time zone was not Korea’s The picker got midnight in Korea, read back on the Korean calendar The picker gets noon in the phone’s time zone, read as a date on the phone’s calendar

The two PRs split the work the opposite way.

PR 258: Switched-Off Devices Accept No New Records

What was wrong

Even when an admin had switched a device off, the customer app could still add new device input and refill records for it. Records piling up on a device that is not in use throw off the remaining-amount calculation.

What changed

The app’s device list already shows a “device not in use right now” notice instead of the record button for switched-off devices. The new notice is for when the list is out of date, such as an admin switching the device off after the screen was opened.

Chosen approach and rejected options

PR 259: Two Date and Time Problems in the Customer App

1. A future time could be picked on Android

What was wrong: On Android, picking a date first and then a time could give a time later than now. The date picker had an “up to today” limit, but the time picker had none. The time fields for input records and reading records share the same code, so both were affected.

What changed:

2. Dates off by a day when the phone’s time zone is not Korea’s

What was wrong: The screen that records count changes passed “midnight in Korea” to the date picker and read the picked value back on the Korean calendar. On a phone not set to Korea’s time zone, the picker could open on the previous day, or the picked day could shift by one. For example, midnight in Korea is 3 p.m. the previous day in UTC, so on a phone set to UTC the date shows as the day before.

What changed: It now uses the approach another date screen (the input history screen) already used. The picker gets noon in the phone’s time zone, and the picked value is read as a date on the phone’s calendar. Noon stays on the same date even when time zones differ by several hours. The default “today” and the future-date check still use the Korean date.

Changing the time zone in the test environment

Time zone bugs only show up when tests run in another time zone. These are the methods Claude chose and rejected.

Having a test environment change the process time zone is new in this repository.

How it was checked

PR 258

PR 259

Not checked

Lessons