Exercise 3 solution from datetime import datetime, timezone from zoneinfo import ZoneInfo, ZoneInfoNotFoundError def get_zone(name): try: return ZoneInfo(name) except ZoneInfoNotFoundError: return None for name in ["Europe/Paris", "BST", "Europe/Londn", "America/Chicago"]: zone = get_zone(name) print(name, "->", "unknown" if zone is None else zone.key) start = datetime(2026, 9, 3, 18, 0, tzinfo=ZoneInfo("Europe/Paris")) stored = start.astimezone(timezone.utc) print("stored", stored.isoformat()) for name in ["Europe/Paris", "America/Chicago", "Asia/Tokyo"]: print(name, stored.astimezone(ZoneInfo(name)).isoformat()) print(stored == start) Output (run, and exactly as shown): Europe/Paris -> Europe/Paris BST -> unknown Europe/Londn -> unknown America/Chicago -> America/Chicago stored 2026-09-03T16:00:00+00:00 Europe/Paris 2026-09-03T18:00:00+02:00 America/Chicago 2026-09-03T11:00:00-05:00 Asia/Tokyo 2026-09-04T01:00:00+09:00 True Explanation: abbreviations such as BST are not IANA keys and are rejected, as are typos; catching ZoneInfoNotFoundError lets the program report a clear message instead of crashing. The UTC value is the one to store. Every local view is derived from it with astimezone, and the final True shows that the stored value and the original local value are the same instant.