Bug 1769 - vCalendar timezone glitches
Summary: vCalendar timezone glitches
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: Plugins/vCalendar (show other bugs)
Version: 3.6.1
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2008-11-05 19:00 UTC by J
Modified: 2015-03-05 09:11 UTC (History)
2 users (show)

See Also:


Attachments
VCalendar Request that causes timezone problems (1.67 KB, text/plain)
2009-03-05 16:37 UTC, Christopher White
no flags Details
vcalendar patch (2.82 KB, patch)
2014-12-16 11:26 UTC, Darko
no flags Details | Diff

Description J 2008-11-05 19:00:46 UTC
I received a meeting invitation from someone using Outlook, at 14h30 using GMT+4 time zone.
I am also at EST timezone.

Reception went well.

However, when I sent an acknowledgement, it was at 14h30 UTC... 8h30.
This is strange, previous acknowledgements I sent were OK.

I have no time to understand the contents of the messages (protocol) at the moment.
Comment 1 Colin Leroy 2008-11-08 11:42:56 UTC
it works for me. can you reproduce it in a sure way?
Comment 2 Christopher White 2009-03-05 16:33:52 UTC
I'm seeing the same issue.  I just installed Claws 3.7.0 with the plugins on OpenSuse 11.1.  It seems to be quite repeatable.

I'm in EST (-0500).  The Exchange Server used to send out the invite is in PST (-0800).  As a result, a meeting that is scheduled for 1:00pm - 3:00pm EST is showing up in my calendar as 10:00am - 12:00pm.  (My local clock is set to EST).

I'll attach the decoded vcalendar request.

I tried to reopen the bug, but cannot because of permissions.  Shall I open a new bug?
Comment 3 Christopher White 2009-03-05 16:37:29 UTC
Created attachment 663 [details]
VCalendar Request that causes timezone problems
Comment 4 Colin Leroy 2009-03-05 16:47:03 UTC
Reopening
Comment 5 Erik 2010-01-19 16:43:52 UTC
i received a meeting request from a JavaMail user at GMT-5h (US) for 12.30pm and I am in GMT+0 (UK). vCalendar did not adjust the time, so the meeting is in my calendar in the past, at 12.30pm. It should automatically adjust and put the meeting in the calendar display for 5.30pm local time.
Comment 6 Erik 2010-01-19 16:45:19 UTC
sorry should have mentioned I am on claws-mail version 3.7.4 from your ubuntu karmic ppa.
Comment 7 Thierry Hugue 2010-01-20 13:27:10 UTC
Same thing here:
- meeting request sent with a schedule at 2PM (local timezone is GMT +1)
- meeting request understood by the tool as starting at 1PM

Extract from the vCalendar interpreted received email:
Starting:    Thu Jan 21 13:00:00 2010
Ending:      Thu Jan 21 14:00:00 2010
Description: When: Thursday, January 21, 2010 2:00 PM-3:00 PM (GMT+01:00) Brussels, Copenhagen, Madrid, Paris.

(Note: sender = Outlook)
Comment 8 jerogee 2013-05-07 10:15:52 UTC
I got the same problem.

Extract of Meeting request:

  PRODID:Microsoft Exchange Server 2007
  ...
  BEGIN:STANDARD
  DTSTART:16010101T020000
  TZOFFSETFROM:-0400
  TZOFFSETTO:-0500
  RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=11
  END:STANDARD
  BEGIN:DAYLIGHT
  DTSTART:16010101T020000
  TZOFFSETFROM:-0500
  TZOFFSETTO:-0400
  RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=2SU;BYMONTH=3
  END:DAYLIGHT
  ...
  DTSTART;TZID=Eastern Standard Time:20130508T083000
  DTEND;TZID=Eastern Standard Time:20130508T093000

Local time zone is GMT +1.

GOT scheduled as:
- Starting: Wed May  8 08:30:00 2013
- Ending: Wed May  8 09:30:00 2013

SHOULD have been scheduled as:
- Starting: Wed May  13:30:00 2013
- Ending : Wed May  14:30:00 2013
Comment 9 Darko 2014-12-16 11:26:42 UTC
Created attachment 1461 [details]
vcalendar patch

Attempt at fixing time zone stuff in vcalendar meeting requests.
I have tested it against couple of meeting requests at work. The
requests have originated in different parts of the world and all
seem to display fine.

Note that this patch does not handle daylight saving time stuff.
I have one recuring meeting request that was created while DST
was in effect and it displays fine on winter time (it was created
in my local time zone however so no guarantees it might work for
all meeting requests).

The patch performs the following tasks:
1. Extract UTC offset from the meeting request
2. Convert the event time to UTC time by substracting the offset from step 1.
3. Calculate UTC offset for local time zone
4. Conver the event time from UTC time to local time by adding the UTC offset from step 3.
Comment 10 Darko 2014-12-16 11:28:24 UTC
One more thing regarding my previous comment. To apply the patch:
cd /top/of/claws-mail/tree
patch -p0 < /path/to/vcalendar.patch

Of course you have to recompile claws-mail to test the patch.
Comment 11 users 2015-03-05 08:56:03 UTC
Changes related to this bug have been committed.
Please check latest Git and update the bug accordingly.
You can also get the patch from:
http://git.claws-mail.org/

++ ChangeLog	2015-03-05 09:56:02.875254790 +0100
http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=3b3435ae42777ed45da649d086283e23ea80c5f7
Merge: 21f32ab a4a3763
Author: Colin Leroy <colin@colino.net>
Date:   Thu Mar 5 09:56:02 2015 +0100

    Merge branch 'master' of file:///home/git/claws

http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=a4a376355c76ed7c0614edf0c109be6b1d8efea0
Author: Paul <paul@claws-mail.org>
Date:   Thu Mar 5 08:55:10 2015 +0000

    fix bug 1769, ' vCalendar timezone glitches'
    
    Patch by Darko Koruga

Note You need to log in before you can comment on or make changes to this bug.