bolkedebruin commented on code in PR #34492:
URL: https://github.com/apache/airflow/pull/34492#discussion_r1334024030
##########
airflow/serialization/serializers/datetime.py:
##########
@@ -62,12 +68,30 @@ def deserialize(classname: str, version: int, data: dict |
str) -> datetime.date
from pendulum import DateTime
from pendulum.tz import timezone
+ from pytz.reference import USTimeZone
+
+ tz: USTimeZone | Timezone | None = None
+ if isinstance(data, dict) and TIMEZONE in data:
+ if version == 1:
+ # try to deserialize unsupported US timezones
+ mapping_us_timezones = {
+ "EDT": USTimeZone(-5, "Eastern", "EST", "EDT"),
Review Comment:
Suggestion:
```
tz_map = {
"EDT": Timezone("America/New_York"), # EDT is deprecated
"CEST": Timezone("CET"), # will be adjusted for DST automatically
}
```
and maybe a configurable one, so when an exception turns up the user can
specify it in the config what the mapping needs to be?
(https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#NEW_YORK)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]