Conversation
Matomo's cdt parameter expects timestamps in UTC timezone, but we were sending local timezone timestamps (e.g., CET) without conversion. This caused backfill visits to appear at incorrect times in Matomo. Changes: - Add format_cdt() helper that converts timezone-aware datetimes to UTC - Replace all strftime calls for cdt param with format_cdt() - Add test_format_cdt_converts_to_utc() to verify conversion Example: - Before: 14:30 CET sent as '2025-12-01 14:30:00' (Matomo interprets as UTC) - After: 14:30 CET sent as '2025-12-01 13:30:00' (correct UTC equivalent) Fixes P-032 backfill not sending data to correct dates.
Standalone script to verify backfill functionality against a local Matomo: - Sends test visits with historical timestamps (UTC-converted) - Validates Matomo connectivity and token_auth - Reports success/failure by date - Provides verification steps for manual inspection Usage: MATOMO_TOKEN_AUTH='token' python3 test_backfill_local.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Delivers historical backfill mode for generating timestamped visits over configurable past windows (30–180 days).
Changes
test_backfill.py)Commits
fb0dc9dfeat: add backfill config validation and env mapping8f673aafeat: add backfill config UI and documentation68b98dbtest: add backfill validation coverage1843a4bfeat: deliver backfill mode with tests and docsdac8329feat: show backfill status on dashboardCloses