feat(flow-php/etl): datetime columns have one time zone - #2658
Merged
Merged
Conversation
- 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
Codecov Report❌ Patch coverage is 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 🚀 New features to boost your workflow:
|
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.
Change Log
Added
flow-php/types-type_datetime($zone)- a datetime type carries one time zone, UTC by defaultflow-php/etl-datetime_schema(zone:)declares a datetime column zoneflow-php/flow-php-ext-datetimeZones()capability marker for column-zone aware casts and decodersFixed
flow-php/types-type_time()cast of a datetime returns its wall clockflow-php/types-type_date()cast no longer mutates aDateTimeflow-php/etl-to_date_time()keeps the time of a datetime objectChanged
flow-php/types- datetime casts land in the column zone, naive strings ignoredate.timezoneflow-php/types- date casts land at midnight UTCflow-php/types- nullable types always cast their valueflow-php/etl- rows and Floe reads move datetime values into the column zoneflow-php/etl- merging datetime columns of different zones widens to UTC, time with date/datetime to stringflow-php/etl-to_timezone(),now(),to_date_time()return zoned columns,to_timezone()takes a constant zone onlyflow-php/flow-php-ext- native casts and decoders apply the column zoneflow-php/etl-adapter-excel- date cells read as UTC wall clockflow-php/filesystem- datetime partition values use the column zone dateRemoved
Deprecated
Security