-
-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] zoneinfo lost localize
DST logic
#649
Comments
Hi @thet, as I understood - I read it somewhere about pytz - pytz has a localize function because of the limitations that came with datetime at the time that pytz was created. From my memory: Having said that, I got all off my mind and now, I wonder if I really understood the question. So, this is the code:
This is the equivalent now, see https://docs.python.org/3/library/zoneinfo.html#using-zoneinfo
This is should be equivalent functionality. Questions that I have:
|
Yes. Zoneinfo
We can see that the fold is not correctly represented in the way we provide values. This must have slipped though the test cases. pytzChecking pytz... Yes, results are off.
ThunderbirdI will see what that does. It is a bit buggy to create events around that time, see here: https://bugzilla.mozilla.org/show_bug.cgi?id=1904335 This is what I get with Thunderbird:
How to go onIt seems that this is not a new issue. The question to me is how the standard deals with this. Do you have an idea? |
hmmm. I need to read myself into that topic again. will look into that later. |
Stackoverflow: https://stackoverflow.com/questions/68643703/is-there-a-way-in-icalendar-to-specify-an-event-in-the-second-hour-of-a-dst-over
It seams that that is considered as not possible to describe in the standard. |
I just recognized that the icalendar's reimplementation of the
localize
function is most likely failing within the daylight saving change period.It is simply replacing the naive's zoneinfo with our zoneinfo providing the correct timezone information.
However, within daylight saving time (DST) periods, we need code like this:
https://github.com/stub42/pytz/blob/fb43f957c5149e750c3be3cfc72b22ad94db4886/src/pytz/tzinfo.py#L261
We could re-implement this.
The text was updated successfully, but these errors were encountered: