Title: Incrementing by day fails for timezones like Chile/Continental where spring forward occurs at midnight. Works for Europe. · Issue #915 · python-pendulum/pendulum · GitHub
Open Graph Title: Incrementing by day fails for timezones like Chile/Continental where spring forward occurs at midnight. Works for Europe. · Issue #915 · python-pendulum/pendulum
X Title: Incrementing by day fails for timezones like Chile/Continental where spring forward occurs at midnight. Works for Europe. · Issue #915 · python-pendulum/pendulum
Description: import pendulum # pendulum==3.0.0 # Python 3.10.7 # Step 1 : start the day before spring forward dst day >>> dt = pendulum.datetime(2025, 9, 6, 0, 0, tz="Chile/Continental") >>> print("Start:", dt) Start: 2025-09-06 00:00:00-04:00 >>> pr...
Open Graph Description: import pendulum # pendulum==3.0.0 # Python 3.10.7 # Step 1 : start the day before spring forward dst day >>> dt = pendulum.datetime(2025, 9, 6, 0, 0, tz="Chile/Continental") >>> print("Start:", dt)...
X Description: import pendulum # pendulum==3.0.0 # Python 3.10.7 # Step 1 : start the day before spring forward dst day >>> dt = pendulum.datetime(2025, 9, 6, 0, 0, tz="Chile/Continental") >...
Opengraph URL: https://github.com/python-pendulum/pendulum/issues/915
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Incrementing by day fails for timezones like Chile/Continental where spring forward occurs at midnight. Works for Europe.","articleBody":"```\nimport pendulum\n\n# pendulum==3.0.0\n# Python 3.10.7\n\n# Step 1 : start the day before spring forward dst day\n>>> dt = pendulum.datetime(2025, 9, 6, 0, 0, tz=\"Chile/Continental\")\n>>> print(\"Start:\", dt)\nStart: 2025-09-06 00:00:00-04:00\n\n>>> print(dt.add(days=1))\n2025-09-07 01:00:00-03:00 # since no midnight in chilean tz\n\n# Step 2: Add 1 day and normalize to start_of_day\n>>> dt_plus1 = dt.add(days=1).start_of(\"day\")\n>>> print(\"After 1 day:\", dt_plus1)\nAfter 1 day: 2025-09-06 23:00:00-04:00\n\n# Step 3: Check if it's truly start of day\n>>> print(\"Is start of day?\", dt_plus1 == dt_plus1.start_of(\"day\"))\nIs start of day? False\n\n# Step 4: Add another day and normalize again\n>>> dt_plus2 = dt_plus1.add(days=1).start_of(\"day\")\n>>> print(\"After 2 days:\", dt_plus2)\nAfter 2 days: 2025-09-07 01:00:00-03:00\n\n# BUT Same concept works for CET correctly \n\n# Step 1: Start one day before spring forward day (but spring forward at 2am not midnight!)\n>>> dt = pendulum.datetime(2025, 3, 29, 0, 0, tz=\"Europe/Vienna\")\n>>> print(\"Start:\", dt)\nStart: 2025-03-29 00:00:00+01:00\n\n>>> print(dt.add(days=1))\n2025-03-30 00:00:00+01:00\n\n# Step 2: Add 1 day and normalize to start_of_day\n>>> dt_plus1 = dt.add(days=1).start_of(\"day\")\n>>> print(\"After 1 day:\", dt_plus1)\nAfter 1 day: 2025-03-30 00:00:00+01:00\n\n# Step 3: Check if it's truly start of day\n>>> print(\"Is start of day?\", dt_plus1 == dt_plus1.start_of(\"day\"))\nIs start of day? True\n\n# Step 4: Add another day and normalize again\n>>> dt_plus2 = dt_plus1.add(days=1).start_of(\"day\")\n>>> print(\"After 2 days:\", dt_plus2)\nAfter 2 days: 2025-03-31 00:00:00+02:00\n```\n\n\n","author":{"url":"https://github.com/quoth-le-corbeau","@type":"Person","name":"quoth-le-corbeau"},"datePublished":"2025-08-27T20:10:02Z","url":"https://github.com/python-pendulum/pendulum/issues/915"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1c3b95d0-9928-21ad-dcbb-f4e75ed8a6fc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B8AE:34B9D4:3BCB00:5516BE:6B04649C |
| html-safe-nonce | af64e39317c0713490c25115c8e1c43fd90546a749fe499e027f84711a97ffc2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOEFFOjM0QjlENDozQkNCMDA6NTUxNkJFOjZCMDQ2NDlDIiwidmlzaXRvcl9pZCI6IjE1ODMwMDYyMDg0MzUxODQ3OTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9520756a303fc3c67de86be594ca05e0024426259d44673d0041f511a21aa77e |
| hovercard-subject-tag | issue:3360718483 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-pendulum/pendulum/915/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d2b22bcdfbf7a92c06881e5b8d1473b900232bfa365922f6801ac132aeffd82a/python-pendulum/pendulum/issues/915 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d2b22bcdfbf7a92c06881e5b8d1473b900232bfa365922f6801ac132aeffd82a/python-pendulum/pendulum/issues/915 |
| og:image:alt | import pendulum # pendulum==3.0.0 # Python 3.10.7 # Step 1 : start the day before spring forward dst day >>> dt = pendulum.datetime(2025, 9, 6, 0, 0, tz="Chile/Continental") >>> print("Start:", dt)... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | quoth-le-corbeau |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2d58451b4bcb73c33c67bfb6b28fb75fe6d5e279daf9b560fa4fd832f3d8c9a6 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-pendulum/pendulum git https://github.com/python-pendulum/pendulum.git |
| octolytics-dimension-user_id | 191041900 |
| octolytics-dimension-user_login | python-pendulum |
| octolytics-dimension-repository_id | 62095504 |
| octolytics-dimension-repository_nwo | python-pendulum/pendulum |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 62095504 |
| octolytics-dimension-repository_network_root_nwo | python-pendulum/pendulum |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 03e114520787ad27289207f153520ef97461127c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width