! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Foreign lightning/sunbird ics files show time offset in event view


Description b3nmore 2011-08-27 14:04:59 CEST
Created attachment 3833 
Example mozilla calendar file for timezone Europe/Berlin

I like to have my local lightning ics calendars to be displayed in orage (read only). The timezone settings in all applications are set to Europe/Berlin. If I click now in Orage on a day with an event, the event is shown with an time offset off 2 hours. Opening the event in the Orage editing window it shows the correct times. Also alarms popup at the correct time
If I save the event in an Orage ics file the times are displayed correctly in the event view.

I've attached an example mozilla ics.
Comment 1 juha editbugs 2011-08-28 11:58:39 CEST
Looks strange as timezone setting looks quite normal.
can you show 
$ orage -v
so that I can be sure of your version.
Comment 2 b3nmore 2011-08-28 20:45:37 CEST
This is orage version 4.8.1

Released under the terms of the GNU General Public License.
Compiled against GTK+-2.24.1, using GTK+-2.24.4.
Using DBUS for import.
Using libnotify.
Using automatic archiving.
Using operating system package libical.
Comment 3 juha editbugs 2011-08-29 10:58:39 CEST
Yes, I can reproduce this.

The problem happens when you use operating system package libical and you have local timezone definition in the calendar file.

This works with the local Orage libical library, so you have basically two ways
to fix it:
1) Use Orage local libical (needs compiling and linking from the source).
2) modify the appoinment file so that libical library does not recognise the local timezone definition. Easiest way to do this is to change (or delete) the TZID line:
Modify it to for example
Or basically to any other value. The bad thing is that you probably need to modify it again to pass it back to the original calendar. Deleting the whole VTIMEZONE component (=everything between  BEGIN:VTIMEZONE and END:VTIMEZONE including those lines) probably would work in both systems.

This looks like a bug in the libical code and is hard to fix.
Comment 4 b3nmore 2011-08-29 19:35:11 CEST
Thanks for the quick reply. Solution 2 is not going to work, because lightning re-adds the deleted/modified timezone definition.

Is there any explanation why times are displayed correctly in the event editing window? I even get a notification at the right time, if alarm notifications are enabled. 
Wouldn't this mean that at same stage Orage gets/reads times correctly from the ics?
Comment 5 juha editbugs 2011-08-30 08:04:47 CEST
In the event window Orager simply shows the data from the file. It does not do timezone conversion, Orage just reads and displays the data, which is correct.

The error happens when libical does real timezone conversions.

Alarms do use a bit different method (=different libical calls) of timezone conversion. Orage does more privately and relies less on libical. Maybe this is the way to "fix" this, but it is notra quick and easy thing to do.
Comment 6 David Schneider 2012-01-20 01:21:08 CET
It just seems like the timezone is being applied twice (event, then local).  Perhaps Orage doing something like converting the time outputted by libical into a local time, when libical was already reporting a local time, hence offsetting it again?  I have the same issue with calendars downloaded from Google Calendar.
Comment 7 b3nmore 2012-01-31 07:24:28 CET
Created attachment 4157 
no VTIMEZONE section, events with varying TZIDs
Comment 8 b3nmore 2012-01-31 07:26:09 CET
Created attachment 4158 
VTIMEZONE Europe/Berlin, individuell TZIDs
Comment 9 b3nmore 2012-01-31 07:27:23 CET
Created attachment 4159 
VTIMEZONE (fake) Pacific/Guam, individuell TZIDs
Comment 10 b3nmore 2012-01-31 07:28:25 CET
I believe David is basically right. I did some further testing with the attached ics files with following results:
1) calendar without a VTIMEZONE section: time conversion works (cf. no_calendar_tz.ics)
2) calendar has a VTIMEZONE section but the event has no TZID (e.g. DTSTART:20100526T060000Z): conversion works
3) calendar has a VTIMEZONE section, the event has a TZID, but they have different time zones: conversion works (cf. calendar_tz_berlin.ics, calendar_tz_guam.tz)
4) calendar has a VTIMEZONE section and the event has a TZID, both have the same time zone:
time conversion fails (cf. calendar_tz_berlin.ics, calendar_tz_guam.tz).

In the last case the conversion goes like this: event in local time -> event in gmt (according to TZID/VTIMEZONE) -> event in 'alternate gmt' (same shift as in previous step) -> event in the time orage is configured to display.
Comment 11 juha editbugs 2013-11-24 15:10:54 CET
This is fixed in
Comment 12 juha editbugs 2013-12-11 08:11:24 CET
Fixed in 4.10.0

Bug #7929

Reported by:
Reported on: 2011-08-27
Last modified on: 2013-12-11


CC List:
1 user



Additional information