Skip to content

Count debt ages from the actual event time - #113

Merged
lyrixx merged 1 commit into
mainfrom
fix-debt-age-timezone
Dec 1, 2026
Merged

lyrixx merged 1 commit into
mainfrom
fix-debt-age-timezone

Conversation

@lyrixx

@lyrixx lyrixx commented Dec 1, 2026

Copy link
Copy Markdown
Member

DebtCreator stores event.created_at as wall time in the TIMEZONE, but Doctrine reads it back in the PHP timezone (UTC). The /monologue ages were one day short during the hour after the time of day of the debt, two in summer.

The age is now counted from timestamps: diff()->format('%a') miscounts across a DST change when both dates share a zone.

DebtCreator stores event.created_at as wall time in the TIMEZONE, but
Doctrine reads it back in the PHP timezone (UTC). The ages were one day
short during the hour after the time of day of the debt (two hours for a
debt created in summer).
@lyrixx
lyrixx marked this pull request as ready for review December 1, 2026 18:54
@lyrixx
lyrixx merged commit 225cfc2 into main Dec 1, 2026
3 checks passed
@lyrixx
lyrixx deleted the fix-debt-age-timezone branch December 1, 2026 18:55
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.

1 participant