Skip to content

Use calendar year instead of ISO week year for the file date - #1989

Merged
Mr-Dave merged 1 commit into
Motion-Project:masterfrom
Marijn0:fix/dbse-file-date-year
Nov 18, 2026
Merged

Mr-Dave merged 1 commit into
Motion-Project:masterfrom
Marijn0:fix/dbse-file-date-year

Conversation

@Marijn0

@Marijn0 Marijn0 commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Use %Y instead of %G when storing file_dtl in the motion table so the date uses the calendar year.

%G formats the ISO 8601 week-based year, which can differ from the calendar year near New Year. For example, a file recorded on 2027-01-01 would be stored as 20260101, and a file recorded on 2025-12-29 would be stored as 20261229.

cls_schedule::cleandir_sql() compares file_dtl with a date built from the calendar year. This mismatch can cause recordings to be deleted prematurely or retained for roughly a year longer than intended. The value also determines file-list ordering and is exposed as date in movies.json.

@Mr-Dave

Mr-Dave commented Nov 18, 2026

Copy link
Copy Markdown
Member

Great catch

@Mr-Dave
Mr-Dave merged commit c66d81b into Motion-Project:master Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants