Reminders → Later: tomorrow and next week keep the hour of the click, not the reminder's #565
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#565
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found on 2026-09-29 in a read-only review of postulo at
95348908d, reading the Later service against its docstring and its test.Related to #238.
Checked again on 2026-10-01 against
mainat0a5cad587: still present. The code is now atapplications/views.py:805-821(ReminderLaterView.post);later_timeand its test are where they were.later_time()promises to keep "the time of day it was set for … a reminder to ring somebody at ten was set for ten on purpose, and a postponement is a change of day". It returnstimezone.now() + n days: the reminder's own time is never read, so the reminder moves to the minute the button was pressed. The addition is also done on a UTC instant, so across a clock change the local hour shifts by one. The test that names the promise asserts exactly what the code does, so it cannot fail on either.later_time(applications/services.py:554-564);ReminderLaterView.post(applications/views.py:765-781), which calls it without the reminder;test_tomorrow_and_next_week_keep_the_hour_they_were_set_for(tests/test_deadlines.py:397-402), the only test oflater_time.Europe/Paris, pressing Put off until next week at 10:00 on Tuesday 20 October 2026 gives 2026-10-20T08:00Z + 7 days = 2026-10-27T08:00Z, which is 09:00, because summer time ended on the 25th; the success message then says 09:00.later_timethe reminder. Take the person's local date today plus the days, combine it withtimezone.localtime(reminder.due_at).time(), and make the result aware in the current zone (choosing the later instant for a time that does not exist on a change day and the first for one that occurs twice). Keep measuring the day from today, as the comment onLATER_DAYSintends.Done when
tests/test_deadlines.pyhas a test that postpones a 10:00 reminder at 16:40 and expects 10:00 the next day, and one that postpones a 10:00 reminder by a week across 25 October 2026 inEurope/Parisand expects 10:00 local; both fail today. The existing test is rewritten, since it restates the implementation.