After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 669817 - Events using incorrect timezone
Events using incorrect timezone
Status: RESOLVED FIXED
Product: evolution-mapi
Classification: Applications
Component: Calendar
3.2.x
Other Linux
: Normal normal
: ---
Assigned To: evolution-mapi-maint
evolution-mapi-maint
Depends on:
Blocks:
 
 
Reported: 2012-02-10 16:39 UTC by john
Modified: 2012-02-23 18:19 UTC
See Also:
GNOME target: ---
GNOME version: 3.1/3.2


Attachments
November DST change (16.96 KB, image/png)
2012-02-10 16:39 UTC, john
  Details
March DST change (16.36 KB, image/png)
2012-02-10 16:40 UTC, john
  Details
timezone configuration (46.56 KB, image/png)
2012-02-22 14:45 UTC, john
  Details
timezone configuration (15.69 KB, image/png)
2012-02-22 15:58 UTC, john
  Details
appointment (1.73 KB, application/octet-stream)
2012-02-22 15:58 UTC, john
  Details
ema patch (4.78 KB, patch)
2012-02-23 18:10 UTC, Milan Crha
committed Details | Review

Description john 2012-02-10 16:39:43 UTC
Created attachment 207271 [details]
November DST change

I have a couple of recurring events that span Daylight savings.

example:
Configured Time Zone: America/New York
Event Name: Drop off kids
Start date: 9/1/2011 (UTC-4)
End date: 6/25/2012 (UTC-4)
Start Time: 11:30 AM
End Time 12:15 PM

Daylight savings time switches occur in March and November for this timezone.

I'm using the newer Microsoft Outlook connector. I'm assuming that the original event definition is storing the timezone as UTC-4, or possibly converting and storing it in UTC+0.

The problem occurs during the months where Daylight saving is not "active" (November through early march). My event shows as being from 10:30am - 11:15am (UTC-5) which is NOT correct, but only during those months. It is correct again when daylight savings starts again in march.

I'm assuming that any alarms would probably be wrong too.
Comment 1 john 2012-02-10 16:40:17 UTC
Created attachment 207272 [details]
March DST change
Comment 2 André Klapper 2012-02-12 13:56:36 UTC
Hi John,

(In reply to comment #0)
> I have a couple of recurring events that span Daylight savings.

In which type of calendar, and with which timezone information included?

> I'm using the newer Microsoft Outlook connector.

I don't know exactly what that is - please elaborate.

Also, which Evolution version and distribution is this about?
Comment 3 john 2012-02-13 15:28:05 UTC
(In reply to comment #2)
> Hi John,
> 
> In which type of calendar, and with which timezone information included?
Microsoft Exchange Gregorian calendar, Timezone is America/New York

The server, which I don't have control over reports:
G:\>systeminfo | findstr  /C:"Time Zone"
Time Zone:                 (GMT-05:00) Eastern Time (US & Canada)

But I'm not sure how windows uses time zones internally

When using Outlook in a remote desktop setting, they offer a choice to create the appointment using timezones

> 
> > I'm using the newer Microsoft Outlook connector.
> 
> I don't know exactly what that is - please elaborate.
Exchange MAPI (For Accessing Exchange 2007 servers), as opposed to the IMAP, POP3, etc.

> 
> Also, which Evolution version and distribution is this about?

Ubuntu 11.10
evolution 3.2.2-0ubuntu0.1
evolution-mapi 3.2.0-0ubuntu1
evolution-exchange 3.2.1-0ubuntu1
libexchangemapi-1.0-0 3.2.0-0ubuntu1
libmapi0 1:0.11-1
Comment 4 Milan Crha 2012-02-20 17:51:45 UTC
evolution-mapi 3.2.3 has included a patch for bug #665250, which is also about timezones, but there with GMT Standard time. Could you save the event, by right clicking on it and choosing "Save as", then edit the file and remove from there any private and sensitive information, like user emails, and then add it here, or at least values for DTSTART and DTEND, which should have set TZID to a timezone which was returned by the server.

It'll be good if you could also check timezone set on the server, by the OWA access - it's accessible, if approved by server admins, usually as https://exchange.server.com/owa/
There, at the right top are Options, where you can pick Calendar section on the left, and there is shown timezone being used. I have there written this long text:

> The start and end times for your work week use the (GMT) Casablanca time
> zone instead of the (GMT-05:00) Eastern Time (US & Canada) time zone.
> The (GMT) Casablanca time zone is used so that everyone in the time zone
> can see your work week times correctly when they invite you to meetings.
>
> If you will remain in the (GMT-05:00) Eastern Time (US & Canada) time zone
> permanently, you can change the start and end times for your work week to
> use that time zone.
>
>    Change work week start and end times to the (GMT-05:00) Eastern Time
>    (US & Canada) time zone

where the last sentence is clickable.
Comment 5 Milan Crha 2012-02-20 17:53:37 UTC
Also, from the screen shot I see that the events are in the same timezone as uses Evolution, thus also Edit->Preferences->Calendar and Tasks shows what timezone is used in evolution itself.
Comment 6 john 2012-02-22 14:45:21 UTC
Created attachment 208200 [details]
timezone configuration

Here is the evolution timezone configuration
Comment 7 john 2012-02-22 15:58:17 UTC
Created attachment 208201 [details]
timezone configuration
Comment 8 john 2012-02-22 15:58:47 UTC
Created attachment 208202 [details]
appointment
Comment 9 Milan Crha 2012-02-23 14:10:25 UTC
Aha, the event has start/end times set in UTC, which might be evo-mapi's fault. Was the event initially created in evolution, or on the server?
Comment 10 Milan Crha 2012-02-23 15:17:35 UTC
Never mind, I can reproduce it too, when I create such event on the exchange server. Confirming.
Comment 11 Milan Crha 2012-02-23 18:10:49 UTC
Created attachment 208291 [details] [review]
ema patch

for evolution-mapi;

This fixes it for me. I also realized that even not recurring events has set UTC, instead of the correct time zone. The only issue is that the server defines offset from UTC, while evolution is using (through libical) more fine-tuned timezone locations, thus sometimes this can select "strange" timezone on the first look, though the timezone rules are same. As an example, from GMT+1 evolution-mapi knows about Europe/Berlin, but it picks Europe/Paris (because it's shorter). Similar reason is for GMT-5, where it prefers America/New York, instead of also usable America/Indiana/Indianapolis.

The patch should be easily backportable to 3.2.x, thus feel free to ask your distro maintainer to apply it to your package.

Thanks for pointing this out.
Comment 12 Milan Crha 2012-02-23 18:13:21 UTC
Created commit 5de567e in ema master (3.3.91+)
Comment 13 Milan Crha 2012-02-23 18:19:21 UTC
I forgot to mention, to have the change applied on your side also on events, you might delete your local cache first, thus the events are regenerated, this time with correct timezones. The cache is stored in
  ~/.cache/evolution/calendar/mapi...
and does contain only local copies of downloaded events, thus can be safely removed (while e-calendar-factory and evolution is closed as well).