Exercise 3 solution from datetime import datetime, timezone, timedelta tz = timezone(timedelta(hours=5, minutes=30)) t = datetime(2026, 3, 5, 9, 0, tzinfo=tz) moved = t.astimezone(timezone.utc) relabelled = t.replace(tzinfo=timezone.utc) print(t.isoformat()) print(moved.isoformat()) print(relabelled.isoformat()) print(t == moved, t == relabelled) print(relabelled - t) Output (run, and exactly as shown): 2026-03-05T09:00:00+05:30 2026-03-05T03:30:00+00:00 2026-03-05T09:00:00+00:00 True False 5:30:00 Explanation: astimezone keeps the instant and changes how it is written, so the result is equal to the original. replace(tzinfo=...) keeps the clock reading and swaps the label, which names a different instant. Here the relabelled value is 5 hours 30 minutes later than the original. Use replace only to attach a zone to a naive value whose zone you know; use astimezone to convert an aware value.