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


##########
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:
   To add insult to injury, they can be ambiguous:
   
   ```
   BST, Bangladesh Standard Time, +6
   BST, Bougainville Standard Time, +11
   BST, British Summer Time, +1
   ```
   
   source: 
https://gist.githubusercontent.com/alyssaq/f1f0ec50e79f1c089554d0de855dd09c/raw/ca2f858a1149a20aa9c7507e826eae5636e7cecd/timezone-abbreviations.csv
   



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