Skip to content

Fix maintenance schedule mutation and day rollover bugs#1072

Open
vshnbot wants to merge 1 commit intodevelopfrom
appcat/590/fix/maintenance-schedules
Open

Fix maintenance schedule mutation and day rollover bugs#1072
vshnbot wants to merge 1 commit intodevelopfrom
appcat/590/fix/maintenance-schedules

Conversation

@vshnbot
Copy link
Collaborator

@vshnbot vshnbot commented Feb 13, 2026

Summary

Fixes two bugs in maintenance schedule handling for services with PostgreSQL dependencies (Keycloak, Nextcloud):

  • Mutation bug: AddTime() used a pointer receiver, mutating the original TimeOfDay. This caused the parent service to also get the offset time.
  • Day rollover bug: When the 20-minute offset crossed midnight (e.g. 23:50 → 00:10), the day of week wasn't adjusted.

Replaces AddTime() with AddDuration() that returns a day offset, and moves the offset logic into SetCustomMaintenanceSchedule().

Checklist

  • Update tests.
  • Link this PR to related issues.
  • Merge with /merge comment.

Link: vshn/appcat#590

@mikeshootzz mikeshootzz added bug Something isn't working patch and removed bug Something isn't working labels Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants