#81 — ics file upload issue
| State | Confirmed |
|---|---|
| Version: | 1.1 |
| Area | Functionality |
| Issue type | Bug |
| Severity | Medium |
| Submitted by | Davide Corio |
| Submitted on | 2008-07-20 |
| Responsible | Lennart Regebro |
| Target release: |
—
|
Last modified on
2008-09-13
by
Lennart Regebro
Using Novell Evolution groupware client, I cannot upload my calendar ics file because Plone says that "astimezone() cannot be applied to a naive datetime".
The problem is located in Calendar/common.py.
I see that the date passed to the isinstance() function has an empty tzinfo attribute.
Following some posts found on the net, I temporarily patched the problem by changing:
if local:
date = date.astimezone(gettz())
with:
if local:
date = date.replace(tzinfo=pytz.utc).astimezone(gettz())
The problem is located in Calendar/common.py.
I see that the date passed to the isinstance() function has an empty tzinfo attribute.
Following some posts found on the net, I temporarily patched the problem by changing:
if local:
date = date.astimezone(gettz())
with:
if local:
date = date.replace(tzinfo=pytz.utc).astimezone(gettz())
- Steps to reproduce:
- try to import the attached ics file
Added by
Lennart Regebro
on
2008-09-13 11:58 AM
Issue state:
unconfirmed → open
Responsible manager:
(UNASSIGNED) → regebro
The TZID is /softwarestudio.org/Tzfile/Europe/Rome, which Calendaring doesn't understand this, and this causes the error.
I'm not going to fix bugs in Calendaring, instead I'll make something more modular and cleaner to help with icalendar import/export in Plone, which also support recurring events. I don't know what yet, perhaps collective.calendaring, which is a new version of Calendaring. We'll see.
I'm not going to fix bugs in Calendaring, instead I'll make something more modular and cleaner to help with icalendar import/export in Plone, which also support recurring events. I don't know what yet, perhaps collective.calendaring, which is a new version of Calendaring. We'll see.
event.ics
(