Skip to content

feat(flow-php/etl): datetime columns have one time zone - #2658

Merged
norberttech merged 1 commit into
1.xfrom
datetime-zone
Sep 25, 2026
Merged

norberttech merged 1 commit into
1.xfrom
datetime-zone

Conversation

@norberttech

Copy link
Copy Markdown
Member

Change Log


Added

  • flow-php/types - type_datetime($zone) - a datetime type carries one time zone, UTC by default
  • flow-php/etl - datetime_schema(zone:) declares a datetime column zone
  • flow-php/flow-php-ext - datetimeZones() capability marker for column-zone aware casts and decoders

Fixed

  • flow-php/types - type_time() cast of a datetime returns its wall clock
  • flow-php/types - type_date() cast no longer mutates a DateTime
  • flow-php/etl - to_date_time() keeps the time of a datetime object

Changed

  • flow-php/types - datetime casts land in the column zone, naive strings ignore date.timezone
  • flow-php/types - date casts land at midnight UTC
  • flow-php/types - nullable types always cast their value
  • flow-php/etl - rows and Floe reads move datetime values into the column zone
  • flow-php/etl - merging datetime columns of different zones widens to UTC, time with date/datetime to string
  • flow-php/etl - to_timezone(), now(), to_date_time() return zoned columns, to_timezone() takes a constant zone only
  • flow-php/flow-php-ext - native casts and decoders apply the column zone
  • flow-php/etl-adapter-excel - date cells read as UTC wall clock
  • flow-php/filesystem - datetime partition values use the column zone date

Removed

Deprecated

Security

- type_datetime($zone) / datetime_schema(zone:), UTC by default
- casts, rows() and Floe reads land values in the column zone
- to_timezone(), now(), to_date_time() return zoned columns
- merges keep equal zones, widen different ones to UTC
- flow_php extension mirrors the zone rules, gated by datetimeZones()
- date casts to midnight UTC, time keeps the wall clock
@norberttech norberttech added this to the 0.45.0 milestone Sep 25, 2026
@codecov

codecov Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.32636% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.56%. Comparing base (7e6bb92) to head (0964124).
⚠️ Report is 3 commits behind head on 1.x.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff              @@
##                1.x    #2658      +/-   ##
============================================
+ Coverage     88.54%   88.56%   +0.01%     
- Complexity    26465    26534      +69     
============================================
  Files          2042     2043       +1     
  Lines         77954    78096     +142     
============================================
+ Hits          69026    69166     +140     
- Misses         8928     8930       +2     
Components Coverage Δ
etl 95.35% <100.00%> (+0.04%) ⬆️
cli 87.62% <ø> (ø)
lib-array-dot 96.52% <ø> (ø)
lib-azure-sdk 64.44% <ø> (ø)
lib-doctrine-dbal-bulk 94.24% <ø> (ø)
lib-filesystem 87.61% <100.00%> (ø)
lib-types 94.43% <95.18%> (+0.01%) ⬆️
lib-parquet 70.51% <ø> (-0.04%) ⬇️
lib-parquet-viewer 82.26% <ø> (ø)
lib-snappy 89.86% <ø> (+0.44%) ⬆️
lib-dremel 0.00% <ø> (ø)
lib-postgresql 89.33% <ø> (ø)
lib-telemetry 86.64% <ø> (ø)
bridge-filesystem-async-aws 92.76% <ø> (ø)
bridge-filesystem-azure 90.34% <ø> (ø)
bridge-filesystem-sftp 91.02% <ø> (ø)
bridge-monolog-http 96.84% <ø> (ø)
bridge-monolog-telemetry 94.79% <ø> (ø)
bridge-openapi-specification 91.45% <ø> (ø)
symfony-http-foundation 75.81% <ø> (ø)
bridge-psr18-telemetry 100.00% <ø> (ø)
bridge-psr3-telemetry 98.95% <ø> (ø)
bridge-psr7-telemetry 100.00% <ø> (ø)
bridge-telemetry-otlp 90.11% <ø> (ø)
bridge-symfony-http-foundation-telemetry 92.85% <ø> (ø)
bridge-symfony-filesystem-bundle 91.85% <ø> (ø)
bridge-symfony-filesystem-cache 98.18% <ø> (ø)
bridge-symfony-postgresql-bundle 93.62% <ø> (ø)
bridge-symfony-postgresql-cache 94.41% <ø> (ø)
bridge-symfony-postgresql-messenger 98.80% <ø> (ø)
bridge-symfony-postgresql-session 93.65% <ø> (ø)
bridge-symfony-telemetry-bundle 90.72% <ø> (ø)
adapter-chartjs 80.50% <ø> (ø)
adapter-csv 95.45% <ø> (ø)
adapter-doctrine 93.21% <ø> (ø)
adapter-google-sheet 99.31% <ø> (ø)
adapter-http 88.13% <ø> (ø)
adapter-json 90.97% <ø> (ø)
adapter-logger 44.44% <ø> (ø)
adapter-parquet 95.87% <ø> (ø)
adapter-text 95.45% <ø> (ø)
adapter-xml 88.86% <ø> (ø)
adapter-avro 7.14% <ø> (ø)
adapter-excel 95.91% <100.00%> (+0.03%) ⬆️
adapter-postgresql 95.79% <ø> (ø)
adapter-seal 83.88% <ø> (ø)
bridge-phpunit-postgresql 75.30% <ø> (ø)
bridge-phpunit-telemetry 87.36% <ø> (ø)
bridge-phpstan-types 0.00% <ø> (ø)
bridge-postgresql-valinor 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@norberttech
norberttech merged commit 2bae462 into 1.x Sep 25, 2026
49 of 50 checks passed
@norberttech
norberttech deleted the datetime-zone branch September 25, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant