{
  "id": 16129278,
  "title": "Python says these times are equal. They’re an hour apart.",
  "url": "https://urgent.news/2026/10/23/python-says-these-times-are-equal-theyre-an-hour-apart",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-23T00:23:15.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/brodyga45/python-says-these-times-are-equal-theyre-an-hour-apart-53h3"
  },
  "original_language": "en",
  "account": null,
  "summary": "In a recent Dev.to article, Cedrik showcased an interesting behavior of Python's datetime module when dealing with timezone-aware values during clock changes. When comparing two timezone-aware datetime objects representing the same local time but with different UTC offsets due to a clock change, Python considers them equal. The example provided involved Belgrade's clock change on October 25, 2026, where the local time 02:30 occurs twice - once at UTC+2 and once at UTC+1. Despite the different UTC offsets, Python's comparison operation returns True, and the difference between the two datetime objects is 0 seconds. However, when the datetime objects are converted to UTC, the comparison returns False, and the difference between them is 3600 seconds, highlighting the importance of using UTC values for elapsed time calculations or identity checks. This behavior is documented in Python's datetime reference, and developers should be aware of it when working with timezone-aware datetime objects.",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}