-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
TZID emissions don't match timezone names, but may later result in a timezone name lookup #291
Comments
This is an issue I am running into with an application that uses this as a dependency. This seems to be a bug to me. |
I think the solution would be to do @mauritsvanrees @jdufresne, what do you think about the proposed change? I know it works for version 3.9 of python, but I am not sure about previous versions. |
Sorry, I just occasionally create a release, I don't really understand how this package works or what the correct output would be in this case. |
@mauritsvanrees , if I were to make the change myself, would you be able to approve the PR or know of someone that could approve the PR to get this issue fixed? |
I can approve a PR if I feel comfortable enough about it. It would help if we had a better test setup with GitHub Actions for all Python versions we support, instead of relying on the Jenkins server, which runs the full Plone test suite on the Python versions that Plone supports. I have trouble getting GHA to pass though in this PR I made for it: #340 |
@mauritsvanrees , sorry about the delay in responding. I did not see the PR you had made. I can try to test out a change locally, but I will need to be able to run the test suite locally. Could you explain why you are removing support for certain versions of python in #340 ? |
Timezones have become quite a mess in python, we have three different providers of timezone data (pytz, zoneinfo, dateutil.zoneinfo) and they all behave different. Currently the icalendar library only supports pytz (which is deprecated). With my pull request in #334, the "modern" zoneinfo objects will be supported. dateutil.zoneinfo seems harder to support (#336). |
This is basically what I did in pull request #334. |
When creating an event with a timezone-aware
datetime
object in theAustralia/Melbourne
timezone, the resultant line in the iCalendar file looks like this:Note that
AEST
is emitted in the output rather thanAustralia/Melbourne
.The value used in
TZID
would normally be completely irrelevant, because it's normally only intended to identify a correspondingVTIMEZONE
component elsewhere in the calendar. However, in Issue #44, it seems to be stated that theicalendar
library will try to resolve theTZID
value as apytz
timezone before looking at the includedVTIMEZONE
components.In light of this, the fact that
TZID=AEST
is emitted above instead ofTZID=Australia/Melbourne
feels to me almost certainly in error:The abbreviated value ("AEST" in this case) is ambiguous and fails a
pytz
lookup:iCloud, for example, uses the whole zone name:
Is this an
icalendar
library bug?The text was updated successfully, but these errors were encountered: