bolkedebruin commented on code in PR #34492:
URL: https://github.com/apache/airflow/pull/34492#discussion_r1338200458


##########
airflow/serialization/serializers/datetime.py:
##########
@@ -61,13 +65,31 @@ def deserialize(classname: str, version: int, data: dict | 
str) -> datetime.date
     import datetime
 
     from pendulum import DateTime
-    from pendulum.tz import timezone
+    from pendulum.tz import fixed_timezone, timezone
+
+    tz: datetime.tzinfo | None = None
+    if isinstance(data, dict) and TIMEZONE in data:
+        if version == 1:
+            # try to deserialize unsupported timezones
+            mapping_us_timezones = {
+                "EDT": fixed_timezone(-4 * 3600),
+                "CDT": fixed_timezone(-5 * 3600),
+                "MDT": fixed_timezone(-6 * 3600),
+                "PDT": fixed_timezone(-7 * 3600),
+                "CEST": timezone("CET"),

Review Comment:
   Yes it is. It doesn't map CEST to CET, it just gets the right timezone. It 
doesn't suddenly change `2020-08-01 12:00:00` to `2020-08-01 11:00:00`



-- 
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]

Reply via email to