Skip to content

[14.0][IMP] connector_extension: add server_tz field to backend#884

Merged
eantones merged 2 commits into14.0from
14.0-imp-connector_extension-server_tz
Apr 1, 2026
Merged

[14.0][IMP] connector_extension: add server_tz field to backend#884
eantones merged 2 commits into14.0from
14.0-imp-connector_extension-server_tz

Conversation

@eantones
Copy link
Copy Markdown
Member

@eantones eantones commented Apr 1, 2026

Summary

  • Add server_tz field to connector.extension.backend for backends where the server timezone differs from the data timezone
  • Add server_tz_to_utc and server_tz_to_local conversion methods with fallback to tz when not set
  • Enables correct handling of technical timestamps (e.g., modification dates) that follow the server TZ while business data follows the data TZ

Test plan

  • Verify existing connectors still work without server_tz set (fallback to tz)
  • Set server_tz on a backend and verify server_tz_to_local/server_tz_to_utc use the correct timezone

@eantones eantones force-pushed the 14.0-imp-connector_extension-server_tz branch from b5eb9dd to b6f169d Compare April 1, 2026 15:43
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 1, 2026

Codecov Report

❌ Patch coverage is 28.57143% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.75%. Comparing base (7c24d82) to head (87efe13).
⚠️ Report is 3 commits behind head on 14.0.

Files with missing lines Patch % Lines
connector_extension/models/backend/backend.py 30.76% 8 Missing and 1 partial ⚠️
connector_extension_sql/components/adapter.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             14.0     #884      +/-   ##
==========================================
+ Coverage   50.71%   50.75%   +0.04%     
==========================================
  Files         979      979              
  Lines       16752    16756       +4     
  Branches     3566     3567       +1     
==========================================
+ Hits         8495     8505      +10     
+ Misses       8039     8034       -5     
+ Partials      218      217       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

eantones added 2 commits April 1, 2026 18:14
External systems may have a server timezone different from the data
timezone. For example, a Portuguese healthcare system (data TZ) hosted
on a Spanish server (server TZ). Technical timestamps like modification
dates follow the server TZ, while business data follows the data TZ.

Add a mandatory server_tz field and server_tz_to_utc/utc_to_server_tz
methods. Extract _convert_tz static helper to avoid code duplication
across all conversion methods. Rename tz_to_local to utc_to_local for
clarity, keeping tz_to_local as a deprecated alias.
@eantones eantones force-pushed the 14.0-imp-connector_extension-server_tz branch from b6f169d to 87efe13 Compare April 1, 2026 16:15
@eantones eantones merged commit 44f1618 into 14.0 Apr 1, 2026
12 of 13 checks passed
@eantones eantones deleted the 14.0-imp-connector_extension-server_tz branch April 1, 2026 16:26
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