Bug 68345

Summary: KOrganizer ignores timezone when importing iCalendar events
Product: [Applications] korganizer Reporter: Shaheed <srhaque>
Component: import/exportAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: amitshah, arne.schmitz, axel.braun, christophe, david.narvaez, dv5a, finex, glua, jason, jens-bugs.kde.org, kde.org, robert.b.miller, smartins, stephan.diestelhorst, tuju, winter, wstephenson
Priority: NOR Keywords: triaged
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 4.7.3
Sentry Crash Report:
Attachments: Broken test case that makes KOrganizer ignore the attached time zone.

Description Shaheed 2003-11-16 06:37:14 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 3.3.1 

Extracting an Exchange-originated iCalendar file to the desktop, and then loading into KOrganizer looses the original tiemzone. Note sure if this is related to bug 64342.

So, for example, loading this files:

BEGIN:VCALENDAR
METHOD:REQUEST
PRODID:Microsoft CDO for Microsoft Exchange
VERSION:2.0
BEGIN:VTIMEZONE
TZID:GMT -0800 (Standard) / GMT -0700 (Daylight)
BEGIN:STANDARD
DTSTART:16010101T020000
TZOFFSETFROM:-0700
TZOFFSETTO:-0800
RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=10;BYDAY=-1SU
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010101T020000
TZOFFSETFROM:-0800
TZOFFSETTO:-0700
RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=4;BYDAY=1SU
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
DTSTAMP:20031116T052056Z
DTSTART;TZID="GMT -0800 (Standard) / GMT -0700 (Daylight)":20031110T100000
SUMMARY:Bob Bond's staff
UID:CD0000008B9511D182D800C04FB1625D2F076BC90B1B8C4E89EAD0A2BC0FC5B7
ORGANIZER;CN="Shaheedur Haque":MAILTO:srhaque@ncube.com
LOCATION:
DTEND;TZID="GMT -0800 (Standard) / GMT -0700 (Daylight)":20031110T110000
RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO;WKST=SU
SEQUENCE:0
PRIORITY:5
CLASS:
CREATED:20031111T180542Z
LAST-MODIFIED:20031111T180554Z
STATUS:TENTATIVE
TRANSP:OPAQUE
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
X-MICROSOFT-CDO-INSTTYPE:1
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
X-MICROSOFT-CDO-IMPORTANCE:1
X-MICROSOFT-CDO-OWNERAPPTID:-1
END:VEVENT
END:VCALENDAR

causes an event to show in my calendar at a start time of 10:00 GMT instead of 8 hours later, at 18:00 GMT. It seems that VTIMEZONE is not used?
Comment 1 Reinhold Kainhofer 2003-11-16 14:32:21 UTC
Subject: Re:  New: KOrganizer ignores timezone when importing iCalendar events

> of 8 hours later, at 18:00 GMT. It seems that VTIMEZONE is not used?

Yes, you are right. Currently, we use libical 0.23, which doesn't make use of 
the VTIMEZONE property. We will not be able to fix this for the KE 3.2 
release (we are in freeze, and switching libical to 0.24 is too much of a 
change and would break several other things). 
It's definitely planned to implement this after 3.2 is released.

Reinhold

Comment 2 Shaheed 2003-12-15 21:27:26 UTC
Fixed by kdepim/libkcal/icalformatimpl.cpp revision: 1.95
Comment 3 Gordon Tyler 2004-03-27 21:08:16 UTC
DATE-TIME properties (such as DTSTART) which are specified in UTC form (e.g. 20040327T150100Z) are treated as being in the local time zone and are not adjusted for being in UTC. For example, when in the EST time zone, importing an event whose DTSTART is 20040327T150100Z shows it at 3pm instead of 10am.
Comment 4 kdebugs 2004-09-09 04:33:25 UTC
This seems to be still happening and/or back in 3.3.
Comment 5 Reinhold Kainhofer 2004-09-09 10:46:06 UTC
last comment says it still occurs, so reopen it.
Comment 6 Reinhold Kainhofer 2004-09-26 14:15:20 UTC
> It's definitely planned to implement this after 3.2 is released.

KOrganizer now correctly loads time zone information from the ics file, so you 
event correctly appears at the time given in the ics file.

Cheers,
Reinhold

Comment 7 Marco Paganini 2005-01-06 15:47:25 UTC
Hello Folks,

I don't know if this bug is really dead. I'm using KOrganizer 3.3.1 and I am unable to correctly import ICS files generated by Outlook; the events time is always incorrect. In the case below, I asked a friend to "invite" me to a ficticious event, happening at 08:00 EST. We're both EST. Notice how the event is imported as 05:00. Somehow, KDE uses PST when importing...

I'm using korganizerIn to load this ics. I'd really like to see this bug dead. It is the *only* thing that prevents me from using KOrganizer daily...

And here goes the file:

BEGIN:VCALENDAR
METHOD:REQUEST
PRODID:Microsoft CDO for Microsoft Exchange
VERSION:2.0
BEGIN:VTIMEZONE
TZID:Pacific Time (US & Canada)\, Tijuana
X-MICROSOFT-CDO-TZID:13
BEGIN:STANDARD
DTSTART:16010101T020000
TZOFFSETFROM:-0700
TZOFFSETTO:-0800
RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=10;BYDAY=-1SU
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010101T020000
TZOFFSETFROM:-0800
TZOFFSETTO:-0700
RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=4;BYDAY=1SU
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
DTSTAMP:20050105T152529Z
DTSTART;TZID="Pacific Time (US & Canada), Tijuana":20050107T050000
SUMMARY:testing
UID:040000008200E00074C5B7101A82E00800000000F0988FE010F3C401000000000000000
 010000000F1A7E4C201467145B46137350B47CB48
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN="Doe,
  John":MAILTO:jdoe@nowhere.org
ORGANIZER;CN="Doe, Jane":MAILTO:janedoe@nowhere.org
LOCATION:here
DTEND;TZID="Pacific Time (US & Canada), Tijuana":20050107T053000
DESCRIPTION:hello\N
SEQUENCE:0
PRIORITY:5
CLASS:
CREATED:20050105T152518Z
LAST-MODIFIED:20050105T152518Z
STATUS:CONFIRMED
TRANSP:OPAQUE
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
X-MICROSOFT-CDO-INSTTYPE:0
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
X-MICROSOFT-CDO-IMPORTANCE:1
X-MICROSOFT-CDO-OWNERAPPTID:-702212139
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:REMINDER
TRIGGER;RELATED=START:-PT00H15M00S
END:VALARM
END:VEVENT
END:VCALENDAR

Should this bug report be re-opened, perhaps?

Regards.
Comment 8 Marco Paganini 2005-01-06 15:50:48 UTC
Another piece of information (sorry, I forgot in the previous post):

When I click in the "Incoming messages" area in the status bar, KOrganizer prints the following messages to stderr:

libkcal: ERROR: ICalFormatImpl::readICalDateTime() cannot find timezone "Pacific Time (US & Canada), Tijuana"
libkcal: ERROR: ICalFormatImpl::readICalDateTime() cannot find timezone "Pacific Time (US & Canada), Tijuana"

Regards
Comment 9 Shaheed 2005-01-06 16:24:40 UTC
Marco,

Probably best to reopen this, but I am just about to move countries this 
weekend, so I won't be able to look at it any time soon.

Thanks, Shaheed

Comment 10 Michael Driscoll 2005-03-08 18:59:24 UTC
I'm also seeing this problem (in 3.3 and 3.4 at least).  The following is an excerpt of a meeting scheduled at 9am US/Mountain (GMT-7), interestingly it was imported at what seemed to be GMT-1.

BEGIN:VCALENDAR
METHOD:REQUEST
PRODID:Microsoft CDO for Microsoft Exchange
VERSION:2.0
BEGIN:VTIMEZONE
TZID:(GMT-07.00) Mountain Time (US & Canada)
X-MICROSOFT-CDO-TZID:12
BEGIN:STANDARD
DTSTART:16010101T020000
TZOFFSETFROM:-0600
TZOFFSETTO:-0700
RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=10;BYDAY=-1SU
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010101T020000
TZOFFSETFROM:-0700
TZOFFSETTO:-0600
RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=4;BYDAY=1SU
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
DTSTAMP:20050308T174810Z
DTSTART;TZID="(GMT-07.00) Mountain Time (US & Canada)":20050310T090000
SUMMARY:...
UID:040000008200E00074C5B7101A82E00800000000A032A210C223C501000000000000000
 010000000B91FB61331D5694C9D0FF6F846FD2319
LOCATION:...
DTEND;TZID="(GMT-07.00) Mountain Time (US & Canada)":20050310T100000
DESCRIPTION:...
SEQUENCE:0
PRIORITY:5
CLASS:
CREATED:20050308T174810Z
LAST-MODIFIED:20050308T174812Z
STATUS:CONFIRMED
TRANSP:OPAQUE
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
X-MICROSOFT-CDO-INSTTYPE:0
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
Comment 11 Michael Driscoll 2005-03-08 19:09:20 UTC
Addendum:  I set my time zone from "[No selection]" to "America/Denver" through Configure Kontact->Calender->Time&Date, and now the meeting above is being imported one hour early instead of eight hours late (if I've done my math right).  The GMT-1 in the previous comment should probably be GMT+1.
Comment 12 Peer Frank 2005-04-08 02:30:44 UTC
can only confirm the bug. timing of invitations/events is shifted from USA/pacific to UTC+1. Hardware clock is set to UTC.
Comment 13 Hasso Tepper 2005-06-02 13:04:53 UTC
Also confirmed problems with timezones. I think that it has something to do with TZOFFSETFROM and TZOFFSETTO fields. In my case event is imported as +0200 (EET), but correct is +0300 (EEST).

BEGIN:VCALENDAR
METHOD:REQUEST
PRODID:Microsoft CDO for Microsoft Exchange
VERSION:2.0
BEGIN:VTIMEZONE
TZID:(GMT+02.00) Helsinki/Riga/Tallinn
X-MICROSOFT-CDO-TZID:59
BEGIN:STANDARD
DTSTART:16010101T040000
TZOFFSETFROM:+0300
TZOFFSETTO:+0200
RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=10;BYDAY=-1SU
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010101T030000
TZOFFSETFROM:+0200
TZOFFSETTO:+0300
RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
DTSTAMP:20050530T120554Z
DTSTART;TZID="(GMT+02.00) Helsinki/Riga/Tallinn":20050602T153000
SUMMARY:[stripped]
LOCATION:[stripped]
SEQUENCE:0
PRIORITY:5
CLASS:
CREATED:20050530T120555Z
LAST-MODIFIED:20050530T120556Z
STATUS:CONFIRMED
TRANSP:OPAQUE
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
X-MICROSOFT-CDO-INSTTYPE:0
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
X-MICROSOFT-CDO-IMPORTANCE:1
X-MICROSOFT-CDO-OWNERAPPTID:1884903381
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:REMINDER
TRIGGER;RELATED=START:-PT00H30M00S
END:VALARM
END:VEVENT
END:VCALENDAR
Comment 14 ieure 2005-07-13 23:30:07 UTC
FWIW, this worked fine for me with KDE 3.4.1. I got an event scheduled for 3:30 EST, and it got set to 12:30 PST when I imported it.
Comment 15 Jakob Schiøtz 2005-11-09 12:45:50 UTC
I see the same problem.  I am in CET (GMT+01:00), and the appointments are entered i korganizer one hour early.
Comment 16 step247 2005-12-02 09:55:37 UTC
I did not have that problem (the download part) in KDE 3.4 but now it's back:

 Meeting is at 10 in Outlook/Exchange. (same time zone as I am -  Helsinki)  
If I download this to Korganizer, the meeting will show up at 08.00 in Korganizer.

If I add a meeting to Korganizer at 10 and upload it to Exchange, it will show up there at 12.

I need to have my downloaded meetings with correct time. Any idea what to do?

PS! My hardware clock is set to UTC and my time-zone is EET (same as Helsinki)
I did change the hardware clock to EET etc but this had no effect.
Comment 17 John Bester 2005-12-15 09:44:46 UTC
I am using KDE v3.4.0 / Kontact Organizer v1.1 (SUSE 9.3 installation with all online updates to date) and it seems like the problem still exists. 
Comment 18 step247 2005-12-20 17:22:46 UTC
added a meeting to Exchange:
start 18.00 end 18.30. 
e.mailed this meeting-request to my other e-mail address.

Then I saved the attachment from my e-mail as "meeting.ics"

Open with Korganizer  - It shows up at 18.00 -  Looks good
Import to Korganizer  - It shows up at 18.00 -  Looks good

Problem:  
If I use the Exchange plugin ->  Download... (select date), this same event will be moved to 16.00! 

Here is the content of my meeting.ics file: 

BEGIN:VCALENDAR
METHOD:REQUEST
PRODID:Microsoft CDO for Microsoft Exchange
VERSION:2.0
BEGIN:VTIMEZONE
TZID:(GMT+02.00) Helsinki/Riga/Tallinn
X-MICROSOFT-CDO-TZID:59
BEGIN:STANDARD
DTSTART:16010101T040000
TZOFFSETFROM:+0300
TZOFFSETTO:+0200
RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=10;BYDAY=-1SU
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010101T030000
TZOFFSETFROM:+0200
TZOFFSETTO:+0300
RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
DTSTAMP:20051220T155705Z
DTSTART;TZID="(GMT+02.00) Helsinki/Riga/Tallinn":20051220T180000
SUMMARY:18.00-18.30
UID:{4B88D33B-6196-4833-8F17-F530DB34224D}
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN="xxxx@xxxx
 .xx":MAILTO:xxxx@xxxx.xx
ORGANIZER;CN="AXXXX BXXXXX - NNNNNNN":MAILTO:XXXX.XXXXXX@XXXXXX.XX
LOCATION:LOCATION-NNN
DTEND;TZID="(GMT+02.00) Helsinki/Riga/Tallinn":20051220T183000
DESCRIPTION:\N\N
SEQUENCE:1
PRIORITY:5
CLASS:
CREATED:20051220T155703Z
LAST-MODIFIED:20051220T155703Z
STATUS:CONFIRMED
TRANSP:OPAQUE
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
X-MICROSOFT-CDO-INSTTYPE:0
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
X-MICROSOFT-CDO-IMPORTANCE:1
X-MICROSOFT-CDO-OWNERAPPTID:-1
X-MICROSOFT-CDO-ATTENDEE-CRITICAL-CHANGE:20051220T155703Z
X-MICROSOFT-CDO-OWNER-CRITICAL-CHANGE:20051220T155705Z
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:REMINDER
TRIGGER;RELATED=START:-PT00H15M00S
END:VALARM
END:VEVENT
END:VCALENDAR
Comment 19 Reinhold Kainhofer 2006-11-02 18:55:19 UTC
Reassigning all KOrganizer bug reports and wishes to the newly created 
korganizer-devel mailing list.
Comment 20 Thomas McGuire 2007-02-19 18:21:51 UTC
*** Bug 121055 has been marked as a duplicate of this bug. ***
Comment 21 Thomas McGuire 2007-02-19 18:21:58 UTC
*** Bug 138439 has been marked as a duplicate of this bug. ***
Comment 22 Thomas McGuire 2007-02-19 18:22:18 UTC
*** Bug 127080 has been marked as a duplicate of this bug. ***
Comment 23 Thomas McGuire 2007-02-19 18:27:48 UTC
Maybe bug #72009 and bug #64342 are also duplicates, but I am not 100% sure.
Comment 24 Jason Keirstead 2007-02-19 18:30:38 UTC
Just want to add my prev. comment on here since it could solve some people's problems:

"I have figured out the problem here. If I set the timezone in KCalender, it works as expected. 
 
 Now the question is - why do I need to do this? WHy doesn't KCalender get the timezone from the OS/KDE ?"
Comment 25 Reinhold Kainhofer 2007-02-19 18:36:14 UTC
To me all the test cases given in this bug report are correctly loaded with KOrganizer from KDE 3.5.6. I don't know about the exchange resource, because (1) we don't even have an exchange server to test and (2) the exchange plugin and resource is deprecated anyway. We simply don't have the manpower to maintain it.

Cheers,
Reinhold
Comment 26 J. Becker 2007-02-19 20:10:19 UTC
THE PROBLEM WITH DROPPING THE EXCHANGE PLUGIN

Dropping support for the Exchange plugin will mean that Kontact will become useless for most enterprise migrations: the sad (very, very sad) fact is that most enterprise messaging infrastructures are based around Exchange and since Exchange can be accessed with IMAP and POP3, meeting invites are the last major piece. In fact, at a major Big Three automaker, lack of compatibility with Microsoft Exchange (Evolution has a lot of problems in this area, too: it's just a function of Exchange's very closed-box implementation) was the SINGLE defining problem that prevented them from doing a VERY large migration -- one of the world's largest -- to Linux on the desktop. We solved every other problem for them, except this one. (Because of years of legacy Exchange groupware applications built up across the enterprise, they were unwilling to switch to something better, like a Notes:Exchange bridge, or Notes entirely, or something like Openmail.)

The bottom line is that group/shared calendaring is a major weak spot in open source software, especially with regards to compatibility with Exchange. IF this ONE problem was solved, even us geeks working in enterprise environments can work around other Linux:windows interoperability problems like connections to MS PPTP networks, or requirement of IE for internal applications, or whatever. But not being able to address a shared calendar and find out when meetings are... this is a killer. OWA doesn't even work most of the time.

CALL TO ACTION

Are there any volunteers that can provide an Exchange server for testing to a select group of KDE developers? I'll take responsibility for getting this started if there is interest from the KDE development team. Alternatively, perhaps several people will pitch in to purchase an Exchange account on a hosted provider? Alternatively, perhaps we could convince a hosted provider to provide such an account for free to the KDE project in exchange for a "Proud Sponsor of KDE" banner?
Comment 27 Reinhold Kainhofer 2007-02-19 23:04:42 UTC
Am Montag, 19. Februar 2007 schrieb J.Becker:
> THE PROBLEM WITH DROPPING THE EXCHANGE PLUGIN
>
> Dropping support for the Exchange plugin will mean that Kontact will become
> useless for most enterprise migrations: 


I know, I would LOVE to have / keep / improve exchange support in KOrganizer. 
You don't know how sad it makes me when someone asks for exchange support and 
I have to tell them that we don't have it, so they need to use Evolution.

However, exchange support was never really working: the old plugin/resource 
was not using syncronous actions, so the whole GUI would block while doing 
any communication with the server (and every GUI action would trigger such a 
communication). That worked only when the exchange server was very fast (i.e. 
on the same local network, but definitely not on the internet.

And the new exchange resource was never completely implemented (e.g. timezone 
support is missing, adresses and task don't really work, etc.), mainly due to 
lack of time / manpower working on KOrganizer (see below).

> the sad (very, very sad) fact is 
> that most enterprise messaging infrastructures are based around Exchange
> and since Exchange can be accessed with IMAP and POP3, meeting invites are
> the last major piece. 


Wait a second. I'm talking about accessing the calendar data stored on the 
server. We don't have proper support for that.
You are talking about invitations to meetings / events / todos sent out via 
iTIP/iMIP (via mail). Of course, KOrgnizer supports these, and they are not 
tied to Exchange at all, but rather specified in RFC 2446 and RFC 2447. 
We simply don't have a way to access the calendar stores on an exchange 
server, but we can perfectly understand and send out invitations from and to 
exchange servers.

> In fact, at a major Big Three automaker, lack of
> compatibility with Microsoft Exchange (Evolution has a lot of problems in
> this area, too: it's just a function of Exchange's very closed-box
> implementation) was the SINGLE defining problem that prevented them from
> doing a VERY large migration -- one of the world's largest -- to Linux on
> the desktop. We solved every other problem for them, except this one.
> (Because of years of legacy Exchange groupware applications built up across
> the enterprise, they were unwilling to switch to something better, like a
> Notes:Exchange bridge, or Notes entirely, or something like Openmail.)
>
> The bottom line is that group/shared calendaring is a major weak spot in
> open source software, especially with regards to compatibility with
> Exchange. IF this ONE problem was solved, even us geeks working in
> enterprise environments can work around other Linux:windows
> interoperability problems like connections to MS PPTP networks, or
> requirement of IE for internal applications, or whatever. But not being
> able to address a shared calendar and find out when meetings are... this is
> a killer. OWA doesn't even work most of the time.
>
> CALL TO ACTION
>
> Are there any volunteers that can provide an Exchange server for testing to
> a select group of KDE developers? 


Actually, we (danimo?) even have a copy of the exchange server with a 5-user 
license from Microsoft. 
The really huge problem is mainly that we simply don't have the manpower to 
work on it. I am - as the maintainer of KOrganizer - hardly able to allocate 
any time for KDE development at all (and if I do, that time needs to go into 
bug fixing or porting to KDE 4), and apart from me there is noone really 
working (not that I myself am really working on korganizer) on korganizer 
(bram and allen are doing bug fixes every now and then, which is even more 
often than I do, though).

Cheers,
Reinhold
Comment 28 David Corbin 2007-02-20 00:52:15 UTC
Speaking for myself, the problem is with invitations.  The time is always wrong (in my case, it seem to be by about an hour).  No Exchange server is required, merely the Outlook client.  
Comment 29 Jason Keirstead 2007-02-20 13:36:06 UTC
Yep - this has nothing to do with exchange itself.

When someone sends you an exchange invitation, it is an ICS attachment inside KMail. KMail should be able to handle these ICS attachments.

It has nothing at all to do with "Exchange support". Sure, we have an exchange server here, but I connect to it via IMAP.

"Exchange support" would mean when I accept that invitation that it would be added on the exchange server's calender. That would be super, but for now I would be happy if the appointment was even added o my LOCAL calender correctly. 

As per my above comment - this does work IF you set the timezone dropdown in KOrganizer (settings->Configure KOrganizer->Time & Date). 

My comment still stands - WHY DOES THIS DROPDOWN EVEN EXIST - it is confusing, to a user. I don't understand at all the technical reason why KOrganizer can not use the same timezone as the rest of the OS. Why would it ever need it's own special timezone? 

What makes it even worse is it does not seem to even default to the OS's timezone - this is why all my appointments were wrong until I changed it.
Comment 30 Arne Schmitz 2007-04-24 13:33:45 UTC
I am using KDE 3.5.5 and seeing this problem. I import calendars from google via GCalDaemon. The .ics files contain recurring events with a UTC time (timestamp ending on "Z"). Those and only those events are displayed in KOrganizer with the wrong time. They are offset -2 hours, which corrsponds to my timezone (UTC+2 at the moment).
Comment 31 Bob 2007-06-18 12:33:08 UTC
> The .ics files contain recurring events with a UTC time (timestamp ending on
> "Z"). Those and only those events are displayed in KOrganizer with the wrong
> time.

I can't believe this bug has existed for so long. It's clearly in the code that parses the DTSTART/DTEND strings. As the previous poster mentioned, it is ignoring trailing 'Z' designators, but it also seems to be ignoring TZID specifiers within DTSTART/DTEND strings.

I am in Hawaii and have Korganizer set to Pacific/Honolulu. I have an ics feed from Zimbra, and at the top of the file it specifies PST:

BEGIN:VCALENDAR
PRODID:Zimbra-Calendar-Provider
VERSION:2.0
METHOD:PUBLISH
BEGIN:VTIMEZONE
TZID:(GMT-08.00) Pacific Time (US & Canada)
. . .

but then some appointments are specified as UTC (from Outlook users):

DTSTART:20070619T190000Z
DTEND:20070620T030000Z
. . .

and others in Hawaiian Standard Time:

DTSTART;TZID="(GMT-10.00) Hawaii":20070621T143000
DTEND;TZID="(GMT-10.00) Hawaii":20070621T163000

KOrganizer seems to think everything needs to be converted to HST. That first appointment, which should be listed in my calendar at 09:00 (I am in HST and Korganizer is set to HST), is instead listed at 16:00 - it just took the time of  19:00 and subtracted 3, to get 16:00. And the second appointment, which should get listed as 14:30, instead gets listed at 11:30. Again, it ignored the fact that the appointment was already in HST, and it subtracted 3 hours from it.

After all this time?
Comment 32 Andy 2008-01-09 16:30:20 UTC
I am seeing the same problem. I have two machines (one at home, one at school). The one at home is considered the "base" ics file. The one at school reads that calendar file using KDE's fish protocol (I am either at home or at school, so there won't be a writing conflict). Now the home computer also uses GCalDaemon to sync up with Google, which in turn syncs up with my Blackberry. Everything works great, EXCEPT that the school computer is always off. The events on the school computer always 5 hours in the future.

I just tested it again, and I dragged the events on the school computer to the times that they should be, and after a bunch of reloading and saving, everything looks correct.

The timezones as far as I can tell are all set to EST. I am the only one adding new events, so there is never a crazy import or a weird timezone. I am using Kontact 3.5.7 at home, and Kontact 3.5.5 at school. I am unable to upgrade my school computer to a newer version until the summer.

Any thoughts?
Comment 33 Andy 2008-01-09 16:34:34 UTC
> I just tested it again, and I dragged the events on the school computer to the
> times that they should be, and after a bunch of reloading and saving, everything > looks correct. 

I misspoke here. I drag the times and everything looks good. I tried reloading, turning the calendar on and off a couple times, and everything was fine. As soon as a I restart Kontact, the times went back to being five hours off.

I should also note that it only happens on some events, but not others. I can try testing more to see whether it matters that the events are created on the home or school computer.
Comment 34 Andy 2008-01-09 18:02:03 UTC
After playing with this for an hour, I have realized what the problem is. Everything works fine when it is a "one-shot" event (that is, an event without a reoccurrence). If I add a one-shot event, and then sync with Google, there are no problems on the school computer. BUT if I add a reoccurring event, at first there are no problems, but as soon as I sync with Google, then the event gets moved up five hours on the school computer. All other one-shot events are at their proper times.

Here's the event when I create it in Kalendar:

BEGIN:VEVENT
DTSTAMP:20080109T165259Z
ORGANIZER;CN=Andy Pavlo:MAILTO:XXXXXX@brown.edu
CREATED:20080109T165259Z
UID:libkcal-1095314526.408
LAST-MODIFIED:20080109T165259Z
SUMMARY:Test 123
RRULE:FREQ=WEEKLY;BYDAY=TH
DTSTART:20080110T170000Z
DTEND:20080110T190000Z
TRANSP:OPAQUE
BEGIN:VALARM
DESCRIPTION:
ACTION:DISPLAY
TRIGGER;VALUE=DURATION:-PT5M
END:VALARM
END:VEVENT

Here is the event after it syncs up with Google:

BEGIN:VEVENT
DTSTART:20080110T170000Z
DTEND:20080110T190000Z
RRULE:FREQ=WEEKLY;BYDAY=TH
DTSTAMP:20080109T165353Z
UID:XXXXX@google.com
CLASS:PRIVATE
CREATED:20080109T165352Z
LAST-MODIFIED:20080109T165353Z
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:Test 123
TRANSP:OPAQUE
X-RAINLENDAR-LASTALARMACK:20080108T165407Z
BEGIN:VALARM
TRIGGER;VALUE=DURATION:-PT5M
X-MOZ-LASTACK:20080108T165407Z
ACTION:AUDIO
END:VALARM
END:VEVENT

Again, it should be noted that the computer running KDE 3.5.7 does not have any problems. So is it just because I have a slightly older version of Kontact on the school computer? I think I am just going to copy and paste the reoccurring event that I need and hope that the next upgrade after the semester fixes it.
Comment 35 Andy 2008-01-10 15:59:17 UTC
Sorry to keep emailing this page, but I figured out that the problem was the timezone that gets added to the top of the.ics file when it comes back from Google. The following perl script should remove it and make it work again (it also converts the "audio" alarms set by Google back to the popups that Kontact uses). It's not perfect, but it's good enough for now:

my $file = "~/.kde/share/apps/korganizer/std.ics";
my $alarm = "DESCRIPTION:\nACTION:DISPLAY\nTRIGGER;VALUE=DURATION:-PT5M";
my $contents = `cat $file`;
open(FILE, "> $file");
$contents =~ s/(BEGIN:VALARM).*?ACTION:AUDIO.*?(END:VALARM)/$1\n$alarm\n$2/gs;
$contents =~ s/BEGIN:VTIMEZONE.*?END:VTIMEZONE//gs;
print FILE $contents;
close(FILE);
Comment 36 Axel Braun 2008-01-22 15:57:10 UTC
Looks like that it is not on reoccuring events: Using korganizer 3.5.6 (shipped with SuSE 10.3) it happens as well on single events, sended from Lotus Notes.
Comment 37 kavol 2008-02-20 18:57:54 UTC
I just run into this too ...

my system is set to CET

I tried to import the following event:

BEGIN:VCALENDAR
PRODID:Zimbra-Calendar-Provider
VERSION:2.0
METHOD:REQUEST
BEGIN:VTIMEZONE
TZID:(GMT+01.00) Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna
BEGIN:STANDARD
DTSTART:16010101T030000
TZOFFSETTO:+0100
TZOFFSETFROM:+0200
RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=10;BYDAY=-1SU
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010101T020000
TZOFFSETTO:+0200
TZOFFSETFROM:+0100
RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VTIMEZONE
TZID:(GMT-05.00) Eastern Time (US & Canada)
BEGIN:STANDARD
DTSTART:16010101T020000
TZOFFSETTO:-0500
TZOFFSETFROM:-0400
RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=11;BYDAY=1SU
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010101T020000
TZOFFSETTO:-0400
TZOFFSETFROM:-0500
RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=3;BYDAY=2SU
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
UID:33134e2c-8b66-4f8b-b0a8-19f992875b31
ORGANIZER;CN=<snip>
SUMMARY:<snip>
DTSTART;TZID="(GMT-05.00) Eastern Time (US & Canada)":20080221T090000
DTEND;TZID="(GMT-05.00) Eastern Time (US & Canada)":20080221T093000
LOCATION:
STATUS:CONFIRMED
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
TRANSP:OPAQUE
ATTENDEE;CN=<snip>
DTSTAMP:20080220T171606Z
SEQUENCE:1
DESCRIPTION:<snip>
END:VEVENT
END:VCALENDAR


it should be 15:00-15:30 CET but it shows as 9:00-9:30 in my calendar
Comment 38 FiNeX 2008-09-28 19:53:00 UTC
It seems similar to bug #64342.
Comment 39 Jaime Torres 2008-11-23 13:48:19 UTC
With korganizer from KDE 4.1.80 (KDE 4.1.80 (KDE 4.2 Beta1)), libical 0.40, the problem is still there. The events are imported as being in the Floating timezone.
Comment 40 Allen Winter 2008-11-25 02:36:39 UTC
i'm pretty sure current KOrganizer (in trunk, at least) properly computes the times according to timezone.

The newer version of libical we use knows how to deal with TZIDs.

The remaining bug is in the incidence editor, which doesn't know how to deal with TZIDs.  I have that on my list of things to fix "soon".

I tried several of the calendars in this bug report and all of them were displayed in the proper place in the agenda view, and also the tooltips showed the correct times.

I won't close this bug yet because the timezone combobox in the incidence editor still needs to be fixed to handle TZIDs defined in the calendar file.
Comment 41 Robert B Miller 2009-10-06 16:17:23 UTC
Fedora Core 11, KDE 4.3

Steps:
1. Open an .ics file from a client like Outlook that was sent from a different
time zone.
2. Choose Merge into an Existing Calendar, then Akonadi resource
3. The meeting shows up in the time zone from which it was sent, not my time
zone. So, for example, if the meeting originator is on the Pacific coast and
the meeting starts at 0800 Pacific Coast Time (US), it should start at 1100 on
the East Coast (my time). Interesting to note that the event displays for just a moment (less than a second) at the correct time before shifting down 3 hours. It's almost as if the original import worked, then something came along and made the shift.
4. Open the meeting in Korganizer. Note that the time zone for the meeting is
North America / New York.

If choosing a non Akonadi resource:
1. Open .ics file as before
2. Choose a non-Akonadi resource for merging the calendar
3. The meeting notice shows up in the correct time, e.g., at 1100 on the East
Coast given a start time of 0800 Pacific.
4. Open the meeting notice. Note that the time zone is given as Floating.
5. Make any type of change (or even no change at all) and hit Apply or OK.
6. The meeting notice disappears.
7. Un-check, then re-check the resource where the meeting notice was stored
using the Calendar window in the left pane of Korganizer
8. The meeting re-appears, but now at the wrong time, 0800 instead of 1100.
9. Open meeting notice. Time zone remains Floating.


The meeting notices used above come from Outlook. I setup a
Thunderbird calendar on my computer to be in a different time zone (Pacific)
than my Korganizer calendar (Eastern). Meeting notices generated by Thunderbird
were properly accepted and stored by Korganizer with the appropriate time
shift.

So, it appears that the "time zone" problem may be limited to Outlook-type
meeting notices.
Comment 42 Sergio Martins 2010-03-13 21:25:41 UTC
With 4.4 the event appears correctly shifted in relation to my timezone.

But the editor say the event is "Floating".
Comment 43 Robert B Miller 2010-03-13 21:53:39 UTC
Sergio,

Try modifying the entry, or just open it and then click OK. What's been happening to me is that the entry shifts to the time zone of the sender.

So, for instance, if I receive a schedule entry that starts 0700 for the sender, and 1000 for me, the calendar properly shows the entry for me at 1000. When I open the entry, the time zone is Floating as you observed. If I modify the entry (change the alarm time, or end time, whatever) and hit OK, the entry shifts to 0700.

Have not tried this yet with KDE 4.4.1.
Comment 44 Jason Keirstead 2010-03-15 20:28:55 UTC
None of the recent comments have explained why KOrganizer has to have a floating time zone, or why this floating time zone does not default to the running user's time zone?
Comment 45 Stephan Diestelhorst 2011-09-16 08:17:25 UTC
Created attachment 63679 [details]
Broken test case that makes KOrganizer ignore the attached time zone.
Comment 46 Stephan Diestelhorst 2011-09-16 08:18:17 UTC
This is back with recent updates. I am on KOrganizer 4.7, and it seems that the time zone information from the ICS is not taken into account anymore.

(Or the referenced "Eastern Daylight Saving" time zone in my example doesn't exist in the system DB anymore.)

If the time zone does not exist in the system-wide time zone list, the client should actually import the timezone or convert the appointment to the closest matching timezone (America/New_York in my example).

AFACR, this worked with Korganizer from 4.6.x Can provide
Comment 47 David E. Narvaez 2011-10-09 03:36:06 UTC
*** Bug 171570 has been marked as a duplicate of this bug. ***
Comment 48 David E. Narvaez 2011-10-13 06:23:08 UTC
Hi Stephan,

Just to validate, the attached event starts at 11:30 am UTC on Sept 16, right?
Thanks again for providing information.

(Sorry, asking the same question but in the correct bug report)
Comment 49 Stephan Diestelhorst 2011-10-13 13:23:15 UTC
(In reply to comment #48)
> Just to validate, the attached event starts at 11:30 am UTC on Sept 16, right?
> Thanks again for providing information.

Yes, indeed.

> (Sorry, asking the same question but in the correct bug report)

Answering both to make sure things are consistent :-)
Comment 50 David E. Narvaez 2011-10-29 02:51:06 UTC
Git commit c7e0aff4b0badd8b0974b71a7635a61cbbb8ad03 by David E. Narváez.
Committed on 29/10/2011 at 04:39.
Pushed by narvaez into branch 'master'.

Hook ICalTimeZones to Incidence Writers

Hook timezone lists to the calls to incidence writers and print the
list of timezones used.

BUG: 68345
FIXED-IN: 4.7.3
REVIEW: 102838

M  +18   -1    kcalcore/icalformat.cpp
M  +11   -7    kcalcore/icalformat_p.cpp
M  +3    -1    kcalcore/icalformat_p.h

http://commits.kde.org/kdepimlibs/c7e0aff4b0badd8b0974b71a7635a61cbbb8ad03