Skip to content

[Proposal]: There is no good way to convert string to DateTimeZone #1923

@norberttech

Description

@norberttech

Describe the Proposal

Right now we don't have any scalar function that could convert string to \DateTimeZone.

Why do we even need that? Because some times we have timezone in dataset stored as string, but our scalar functions like now or to_date, to_date_time allows to pass DateTimeZone or scalar function that will result in one.

API Adjustments

src/core/etl/src/Flow/ETL/Function/Cast.php should be able to cast to timezone + we should create TimeZone type in Types library:

type_time_zone()

Are you intending to also work on proposed change?

Yes

Are you interested in sponsoring this change?

None

Integration & Dependencies

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions