Skip to content
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

Don't error out on 'Africa/Abidjan' timezone [gyst] #394

Merged
merged 3 commits into from
Jun 5, 2024

Conversation

gyst
Copy link
Member

@gyst gyst commented May 7, 2024

Fixes #393 by not using our own null datetime, which was equal but not identical to datetime.min.

The test provided throws an OverflowError without the patch provided.

@mister-roboto
Copy link

@gyst thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

@gyst
Copy link
Member Author

gyst commented May 7, 2024

Please note that running tests locally gives two errors I also get when running tests against master.

@gyst
Copy link
Member Author

gyst commented May 7, 2024

@jenkins-plone-org please run jobs

@davisagli
Copy link
Member

@gyst I tried this in a Plone site with the site timezone set to Africa/Abidjan. This change avoids the OverflowError, but I got a different error instead.

Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 181, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 391, in publish_module
  Module ZPublisher.WSGIPublisher, line 285, in publish
  Module ZPublisher.mapply, line 98, in mapply
  Module ZPublisher.WSGIPublisher, line 68, in call_object
  Module plone.app.event.ical.exporter, line 407, in __call__
  Module plone.app.event.ical.exporter, line 403, in get_ical_string
  Module zope.component.hooks, line 144, in adapter_hook
  Module plone.app.event.ical.exporter, line 165, in calendar_from_event
  Module plone.app.event.ical.exporter, line 82, in construct_icalendar
  Module icalendar.cal, line 194, in add
  Module icalendar.cal, line 145, in _encode
  Module icalendar.prop, line 852, in __init__
ValueError: Offset value MUST be a timedelta instance

@gyst
Copy link
Member Author

gyst commented May 16, 2024

This fix is for an event with the timezone set to Africa/Abidjan. I did not think about setting the site timezone. This looks like potentially a separate (though similar) bug?

@jensens
Copy link
Member

jensens commented Jun 4, 2024

@jenkins-plone-org please run jobs

@jensens
Copy link
Member

jensens commented Jun 4, 2024

I think @davisagli found a different bug. I am fine to merge this one if all is green here and you create a new issue with above findings.

@jensens jensens merged commit d024c19 into master Jun 5, 2024
14 checks passed
@jensens jensens deleted the 393_africa_abidjan branch June 5, 2024 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ical export breaks
4 participants