Bug 341545 - Timezone offset from current timezone seems to be applied twice
Summary: Timezone offset from current timezone seems to be applied twice
Status: REPORTED
Alias: None
Product: korganizer
Classification: Applications
Component: timezones (show other bugs)
Version: 4.14.2
Platform: Ubuntu Linux
: NOR major
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-04 11:23 UTC by Adam
Modified: 2021-11-06 20:54 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam 2014-12-04 11:23:44 UTC
It appears that when an event is added to the calendar with a different timezone to the default, the offset between the current timezone and the event timezone is applied twice, meaning that the event is placed in the calendar at the wrong time. This happens for events created manually using "new event" or, more annoyingly, for meeting invites.

In the latter case, the meeting invite appears in Kmail with the correct time in the local timezone, but is entered into the calendar as if the timezone hadn't yet been applied. I'm syncing with Google Calendar, which gets the correct information. So, an example of this case:

I'm in the UK, so GMT at the moment. Someone sends a meeting request from South Africa for 2pm SA time. Kmail shows the invite text as being mid-day, which is correct for my local time. I click "Accept" in the invite, and Google Calendar shows mid-day, but KOrganizer calendar shows 10am. I've put the easier to reproduce manual version in the "steps to reproduce."

There seem to be lots of bugs stretching back ages relating to time zones, but I couldn't find this particular issue. Apologies if I missed it.

Reproducible: Always

Steps to Reproduce:
1. Select a day in agenda view.
2. Right click 14:00 and select New Event
3. Click "Time zones" and select a time zone with a different UTC offset to the local zone.
4. Type a subject and click "OK".

Actual Results:  
The event is inserted into the calendar at twice the offset between the local and selected time zones. So if the local zone is Europe/London, no DST, and the selected zone is Africa/Johannesburg ( a difference of 2 hours ) the event is inserted at 10am.

Expected Results:  
The event should be inserted at the local equivalent time, so in this case should have been inserted at 12:00.

I've selected the problem as Major, because whilst it doesn't crash, being able to successfully handle time zones seems to be a fundamental part of a calendar/scheduling app. I have various meetings with people all over the world, and this makes KOrganizer pretty much un-usable. The obvious workaround is to simply adjust meetings manually, but then they get out of sync so that updates etc are a real pain, and also since I use Google Calendar too it can get really confusing. Obviously for people who only use the local time zone it isn't quite so critical!
Comment 1 David Jobet 2016-11-17 09:44:42 UTC
It looks like this problem is not specific to korganizer.
It happens for me with kmail as well.

I'm in England (London).
Unfortunately, my company sets up system to America/New_York and I don't have sudo rights to change it.
So we use TZ=Europe/London to correct timezone.

Every time I send an email using kmail, the mail is sent with twice the offset.
Example :
$ env | grep TZ
TZ=Europe/London
$ date
jeu. nov. 17 09:37:53 GMT 2016
$ TZ=America/New_York date
jeu. nov. 17 04:38:03 EST 2016

If I send a mail it is sent with time=14:38 (= 04:38 + 5h00 * 2, 5h00 = time lag between London and New York)

I've played a little bit with TZ before sending an email with kmail.
If I set TZ to America/New_York (-5), mail is sent with New York's time : correct
If I set TZ to America/Halifax (-4), mail is sent with New York's time + 2 hours : incorrect (should be New York + 1 hour)
If I set TZ to America/Sao_Paulo (-3), mail is sent with New York's time + 4 hours : incorrect (should be New York + 2 hour)
...