-
Notifications
You must be signed in to change notification settings - Fork 213
Offset-error #140
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
Comments
I didn't run again with -v because I see this problem only on the first run of khal |
I am using now khal-git from the AUR of Arch and now khal -v results in more information. But this error is from some other file because I don't remember which I used originally as an example. Too many with the error. But the +5328 is in that one as well. Traceback (most recent call last): |
I brought this issue to collective/icalendar#155 since this is also relevant for icalendar. |
I'll try to have a look ASAP, but probably not before Wednesday, same goes for the other bugs @nielsk just filed. |
Berlin's local time is 53 minutes and 28 seconds before UTC. However, the above UTF offset is 53 hours and 28 minutes. This is not only incorrect, it's nonsensical. You can't have 2 days and 10 hours as a timezone offset. The correct value should not be +5328, but +005328. |
@nielsk it looks like the only timely fix I can offer you atm is just replacing |
@geier which effect would that have? |
@nielsk This corrects your broken timezone specification. |
and lets khal/icalendar parse your files. If you are really motivated you could also file that bug at Apple. |
sounds good. There do not seem any side effects if you understand you correctly. I will file a bug at Apple if I figured out what produces the wrong offset. But since I do not have an Apple-device anymore and use the iCloud-calendars only because of legacy-reasons (my wive still uses Apple-devices and moving to owncloud made problems in my tests) it might be complicated. |
The PRODID is created by the software which originally created the event:
|
That would be iCal from a couple of years ago |
Then its probably irrelevant now (I somehow thought 10.8 was the current OS X version). |
10.10 is the current one |
I also have one with iOS 5.1.1 (we are now at iOS 8) |
@nielsk You should try if events created with those OSes still produce invalid events. If no, it's probably enough to fix it manually once. |
But I see now OS 10.9 and iOS6 as well. I never had 10.10 installed, so hard to test. I will see what I can do @untitaker that will be a bit complicated because I have no device right now that is able to run 10.10 (not enough harddisk space on my wives laptop to upgrade) and testing on iOS8 is even harder (a) not enough space for the upgrade, b) I would have to do some set up which might take some time) |
Hmm, okay. I wonder though if iCal even correctly interprets the corrected timezone specification. Otherwise a fix would be harder. |
I wonder the whole time why the Caldav-tool I am using on Android and Evolution do not have a problem with that offset |
Which caldav tool are you using? DAVDroid or CalDAV-Sync? |
SmoothSync for Cloud Calendar |
@dmfs do you do any timezone-related fixes for iCal? |
No, we just don't evaluate the VTIMEZONE object if the TZID is an Olson ID or if it contains one. Am 10. Dezember 2014 21:14:46 MEZ, schrieb Markus Unterwaditzer [email protected]:
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet. |
I'll close this here, as this is not really a bug in khal (and also because open |
Please reconsider reopening as enhancement, with a label for thirdparty issues. |
Thank you and no rush. Quoting Niels Kobschätzki (2016-04-06 12:12:36)
|
@geier The problem still exists. And tbh I don't understand these ics-files since they have several TZOFFSETFROM/TO in them. An example
|
@nielsk thank you for the feedback, I'll let Apple now. Regarding the number of TZOFFSETs: there are separate TZOFFSETs for every period with different daylight saving time/standard time transitions, that's why every STANDARD and DAYLIGHT block has its own DTSTART (and RRULE) parameter. |
Hello I also have this problem with bad offset in events from Mac OS X (iCloud) - offset is +5744. So khal is ignoring a hundreds of my events - is possible to ignore this timezones in khal event parsing and keep events in view? I don't want Thunderbid with Lighning gigasoftware, I want just khal in my console :(
|
If you are not using Apple's server anymore, you can replace all those invalid offsets, e.g. with sed -i. If you are, you could use my icalendar fork (or apply that latest commit by hand). You can also tell the icalendar community that you have this problem, too, which might lead to a speedier resolution collective/icalendar#155 (comment). |
@nielsk in case you are still using icloud, could you perhaps check if this issue is gone? I got an email from apple claiming that they fixed this issue (which last time, they didn't). |
I'm not @nielsk But I also have this error. I tried the sed "trick" once, but the warnings came back.
|
Christian, it appears that your fork doesn't differ from upstream.
…On Sat, Apr 15, 2017 at 12:08:02AM -0700, Oliver Schrenk wrote:
I'm not @nielsk But I also have this error. I tried the sed "trick" once, but the warnings came back.
```
warning: This event will not be available in khal.
Unknown exception happened.
Traceback (most recent call last):
File "/usr/local/Cellar/khal/0.9.5/libexec/lib/python3.6/site-packages/khal/khalendar/khalendar.py", line 303, in _update_vevent
update(event.raw, href=href, etag=etag, calendar=calendar)
File "/usr/local/Cellar/khal/0.9.5/libexec/lib/python3.6/site-packages/khal/khalendar/backend.py", line 249, in update
ical = icalendar.Event.from_ical(vevent_str)
File "/usr/local/Cellar/khal/0.9.5/libexec/lib/python3.6/site-packages/icalendar/cal.py", line 383, in from_ical
vals = factory(factory.from_ical(vals))
File "/usr/local/Cellar/khal/0.9.5/libexec/lib/python3.6/site-packages/icalendar/prop.py", line 836, in from_ical
'Offset must be less than 24 hours, was %s' % ical)
ValueError: Offset must be less than 24 hours, was +5328
```
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#140 (comment)
|
@geier The problem with bad offsets from Apple servers still exists. When I create event via iCloud WEB site, this is in event:
|
@untitaker I deleted my fork some time ago and re-forked, forgot about this issue. But this would be one of the things I really would like to fix in icalendar, perhaps with a mode=[strict|loose] flag. @petr-fischer thanks for checking! |
For people looking for a fork of icalendar that ignore this problem, try this branch of icalendar. |
When a (nonsensical) TZOFFSET > 24h is encountered, print a warning but do not abort. This commit also creates a new method for icalendar.Calendar creation, which deals with the above mentioned TZOFFSETs. It should always be used for icalendar.Calendar creation. fixes #140
When a (nonsensical) TZOFFSET > 24h is encountered, print a warning but do not abort. This commit also creates a new method for icalendar.Calendar creation, which deals with the above mentioned TZOFFSETs. It should always be used for icalendar.Calendar creation. fixes #140
When a (nonsensical) TZOFFSET > 24h is encountered, print a warning but do not abort. This commit also creates a new method for icalendar.Calendar creation, which deals with the above mentioned TZOFFSETs. It should always be used for icalendar.Calendar creation. fixes #140
As the latest release of icalendar allows to ignore TZOFFSETs > 24h, we can now finally import those ics files (a warning is printed though). |
Awesome! Is there a way to suppress this type of warning? |
@oschrenk you could silence ALL warnings with Feel free to open an issue about it. |
Hello, do i really need to install a fork of iCalendar? Will be this fix available in official icalendar pip package? I installed khal on the FreeBSD in my home directory with this:
Actual versions:
|
no, there is no need to install a fork of icalendar anymore, releases of icalendar >= 3.11.7 contain a switch that allows to ignore those invalid offsets, but only the unreleased version of khal makes use of that. If you "upgrade" to the master branch you should be good, otherwise you'll need to wait for a release. |
@geier - Hello! Do you plan to include fix for "offset" issues to the official version release (which is taken over by FreeBSD [and other] port maintainers)? |
Yes, I plan to and rather shortly. |
I am syncing calendars from iCloud and with loads of events I get the following error:
For one: the event is not in work/something.ics but in home/something.ics which is strange.
And then there is the content of the .ics which has an Offset of +5328 in one line:
The text was updated successfully, but these errors were encountered: