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


##########
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:
   I've also think that some other timezones have "short name", not only in the 
US. For example in the UK use BST (British Summer Time)
   
   ```python
   from pendulum import timezone, DateTime
   DateTime(2023, 8, 1, tzinfo=timezone("Europe/London")).tzname()
   Out[3]: 'BST'
   ```



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