Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Daylight saving causes recurring meetings to be 1 hour off #67

Closed
phw198 opened this issue May 13, 2017 · 36 comments
Closed

Daylight saving causes recurring meetings to be 1 hour off #67

phw198 opened this issue May 13, 2017 · 36 comments
Assignees
Labels
bug Something's not working right codeplex issue Originally raised as a bug on CodePlex recurring appointment resolved Working hotfix available timezones
Milestone

Comments

@phw198
Copy link
Owner

phw198 commented May 13, 2017

Use Outlook -> Google one way sync.

Outlook Google Calendar Sync create google events without timezone.
So after other countries change to light saving time, events in Google are nor
correct.

Steps:

  1. Event created by user from different (origin) counery and in different timezone.
  2. Sync to Google.
  3. Google event is created with current time and zone, not with origin time&zone.
  4. Google event does not show that origin country change to light saving time.

Before light saving:
Look at Outlook: Event starts at 12:00
Look at Google: Event starts at 12:00

After light saving:
Look at Outlook: Event starts at ** 11:00 ** (!!!)
Look at Google: Event starts at 12:00

Possible solution: create events with origin time&zone.

Work Item Details

Original CodePlex Issue: Issue 485
Status: Proposed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Mar 28 at 9:16 AM
Reported by: mkjyhuniolkj
Updated on: May 6 at 10:07 PM
Updated by: phw198

@phw198
Copy link
Owner Author

phw198 commented May 13, 2017

On 2017-04-02 04:58:38 UTC, phw198 commented:

What version of OGCS are you on? Lots of timezone improvements in the recent Alphas...

@phw198
Copy link
Owner Author

phw198 commented May 13, 2017

On 2017-04-06 16:31:42 UTC, mkjyhuniolkj commented:

Hello,

Last version - 2.3.0.0

@phw198
Copy link
Owner Author

phw198 commented May 13, 2017

On 2017-04-06 17:54:01 UTC, mkjyhuniolkj commented:

Nothing changed with version 2.3.5. May be i should somehow resyncronize calendars.

@phw198
Copy link
Owner Author

phw198 commented May 13, 2017

On 2017-04-11 18:35:51 UTC, mkjyhuniolkj commented:

I removed Google calendar and re-synced from scratch. Outlook contain master data.

Google events created without timezone. So in Google they are one our later that in Outlook.

@phw198
Copy link
Owner Author

phw198 commented May 13, 2017

On 2017-04-21 16:55:28 UTC, mkjyhuniolkj commented:

Still having this issue on 2.3.5

How can i help with it?

@phw198
Copy link
Owner Author

phw198 commented May 13, 2017

On 2017-05-07 05:07:52 UTC, phw198 commented:

Ah right, now I've reread your issue....and I don't think there's anything that can be done about it :(

I had exactly the same problem: invites created for a recurring series by someone in the US and for the 2 weeks where our DSTs were off (the UK moved 2 weeks later than the US), the meetings were off by an hours in that period.

Unfortunately, Outlook/Windows/MS calculates the local time of the calendar item into UTC when it arrives, with a timezone offset. This is what you see in step #3 of your opening post. The fact that this offset can change seems to be lost on MS and there's
no way to force it to recalculate. So, with the data available to me through the API, OGCS is doing the right thing.

Can you confirm the issue was only apparent between 12 March (US DST) and 26 March (UK DST)?

@phw198 phw198 added more info needed Not enough detail provided to fully troubleshoot codeplex issue Originally raised as a bug on CodePlex cp-closed labels May 13, 2017
@xristoph79
Copy link

I have the same issue, but for me it is not temporary.... I live in a country with no DST, and have long-running appointments with people in the US. My google calendar is only correct half of the year for those appointments, sadly.

Not sure if it helps at all, you could force outlook to return events in a specific timezone if using REST API (see https://msdn.microsoft.com/en-us/office/office365/api/calendar-rest-operations ). Or possibly you can get the original timezone? REST API docu says "You can use the OriginalStartTimeZone and OriginalEndTimeZone properties on the Event resource to find out the time zone used when the event was created." (Other APIs may have similar capabilities.)

Not sure if you are using REST at all. If you are not, the above may not help. If the events could be formatted/written with the "original" event timezone instead of the timezone of the computer itself, that may resolve the issue. But I would assume that recurring events will need to be written as individual ones if they aren't already.

Alternatively, the program could come with a DST database (or use Windows's inbuilt one, if it exists?) to re-calc dates, though it would have to loop through recurring calendar items to find out which ones to adjust.

@phw198 phw198 removed the cp-closed label Jul 11, 2017
@mtalexan
Copy link

mtalexan commented Jul 25, 2017

This same problem is easily demonstrable by modifying the system timezone of your Windows instance. It appears that the Outlook event time is being retrieved assuming the current Windows timezone setting, then stored into Google Calendar using the default Google Calendar timezone setting. If those timezones don't match for any reason, the times end up wrong. It doesn't seem to matter what timezone the actual event was scheduled in/for.

For example, while I was traveling to a different timezone I had my Windows timezone set to the timezone I was in. A synchronization was performed and events were added to my Google Calendar using my default Google timezone, which was still set to my home timezone. As a result, all devices viewing my Google calendar events were showing the wrong time for the event since the devices themselves were also accounting for the difference in timezones between my home timezone and my current timezone. Events that had already been synchronized to the Google calendar prior to my travel were left at their original times, but any new events that were received while I was traveling, or events that entered the synchronization window while traveling, were added to Google calendar with the wrong times. This occurred for events that I scheduled while in my home timezone, events I scheduled while in the travelling timezone, and events received that were scheduled for very different timezones by the creator (meetings with coworkers on different continents). The problem persisted even after I returned to my home timezone; events that were first synchronized while I was travelling were never updated and were left with the wrong time. The only way I've found to resolve this incorrect synchronization problem is to delete the Google calendar being synchronized to, recreate it as empty, and perform a clean synchronization. This solves the problem after the travelling is complete, but does nothing for the problem while traveling is ongoing. I am/was using 2.5.0.0 with TimezoneDB 2017b when this occurred.

While I'm not an expert in the specific API, the usual way to resolve these problems is to either a) always synchronize relative to a fixed timezone, or b) include the timezone information with the synchronization. If you're able to retrieve the timezone of the original event from Outlook, including that information when synchronizing the event to Google would solve the problem. If you're unable to retrieve/interpret the timezone from Outlook, detection of whether Outlook has converted the timezone to UTC (which apparently occurs whenever the timezone the event was created for doesn't match the timezone Windows is currently set for?) and setting the timezone to UTC+0 in Google would also solve the problem. All viewers of Google Calendars already implement conversion of Google calendar events to current timezone, so simply setting the Google calendar event timezone properly instead of leaving it at the Google setting-default-home timezone would solve the problem. Alternatively if there's a way to always query Outlook event times in UTC time, no timezone adjustment needs to be processed/performed by this tool as long as the resulting events added to Google calendar are always configured for UTC+0.

@gconry18
Copy link

Still an issue in 2.6.0.0

@gconry18
Copy link

Still an issue in v2.7.0.0

@phw198
Copy link
Owner Author

phw198 commented Mar 14, 2018

Please confirm if the hotfix on #486 has resolved this (make sure you are already upgraded to v2.7.1 before applying the hotfix).

@gconry18
Copy link

@phw198 Unfortunately this did not fix it as the issue is with Daylight Savings Time.

I am in South Africa where we do not observe DST.

I have recurring meetings with clients in EST which added 1 hour this week for DST.
When the recurring event was created the time was 5PM my time.
With DST the time is now 4PM my time in outlook.
OGCS is still sending 5PM for all events.

@phw198
Copy link
Owner Author

phw198 commented Mar 14, 2018

@gconry18 Sorry, was thrown by @mtalexan's comment, which should be fixed by #486, but is different from the rest of this ticket.

So to confirm, you are syncing to Google an Outlook meeting invite arranged by someone in EST? What happens if you manually make a change to this meeting (e.g. add a space to the subject, delete the space and hit Ctrl+S) and then sync? Alternatively, try a Shift+Sync to force a full sync?

@phw198 phw198 changed the title Timezone is not saved Daylight saving causes recurring meetings to be 1 hour off Mar 14, 2018
@gconry18
Copy link

@phw198 already tried a full resync and completely deleting the google calendar entry and resyncing.

The meeting was created by my client in EST before DST was in effect.

I think OGCS is using the time of the original recurring meeting and ignoring any timezone DST changes.

This can most likely be fixed by setting the timezone of the entry on the meetings in google. Thoughts?

@phw198
Copy link
Owner Author

phw198 commented Mar 18, 2018

@gconry18 OK, so here's my testing.

Set my Windows timezone to EST
image

and created an Outlook weekly recurring series starting on 4 March that also specified the EST timezone
image

In Outlook this repeats every week at 12:00 as expected.
I sync this to Google, which includes the timezone:
image
and it displays at 19:00 on 4-Mar, and all subsequent weeks at 18:00. Note I did have to change my global Google calendar setting from GMT to Johannesburg as part of this test.

I then changed my Windows timezone to UTC+2:
image

Outlook shows the series at 19:00 on 4-Mar, and all subsequent weeks at 18:00.

So as far as I can tell, it works as expected...? Are you sure you have the right timezone set in Google calendar? 😕

Do you get the same if you repeat my above test? The only fault in the test is it is not a meeting invite from an organiser in EST. I currently don't have a recurring meeting spanning the DST change from someone in that zone, but I could ask a colleague to maybe set me up a mock one...

@brhahlen
Copy link

I am facing the same problem.
I have meetings which are being created by someone else in my company, in EST.
However, since the previous weekend (so not last weekend), the meetings which have been scheduled by them are off by one hour, since DST went into effect in the US.
After the coming weekend, this will not be a problem anymore, as DST will be in effect in Europe as well, but it is a nuisance, as I need to check both calendars now, and can't rely on my Google Calendar alone.

Thanks for all the hard work.

@gconry18
Copy link

@phw198 Thanks for the testing.

My google calendar is set to my timezone (Johannesburg). Looking at the recurring meeting in Google Calendar it comes through without the timezone information. Singular meetings that were created in EST are coming through to google calendar as Johannesburg time zone.

I do not believe OGCS is sending correct timezone information when creating a meeting in Google Calendar.

@phw198
Copy link
Owner Author

phw198 commented Apr 10, 2018

I have now got a recurring series exhibiting the same problem - what is significant is this message:
image

I believe this is why the items are appearing in Google with no timezone information - because Outlook has removed the sender's timezone information by "adjusting it to reflect your current timezone". Problem being that "current" appears to be the time the meeting invite was received, not the present time (ie, it's never recalculated).

I'll try and do some investigation into whether original timezone is still viewable somewhere in the lower MAPI levels of the invite...

@phw198
Copy link
Owner Author

phw198 commented May 14, 2018

Found this forum post, which looks relevant and a MAPI attribute...so now I hopefully have something to work with 🙏

http://schemas.microsoft.com/mapi/id/{00062002-0000-0000-C000-000000000046}/8234001E

@phw198 phw198 self-assigned this May 14, 2018
@phw198 phw198 added this to the v2.7.0 milestone May 14, 2018
@phw198
Copy link
Owner Author

phw198 commented May 24, 2018

📦 And I think we're in luck! This should now be resolved with hotfix v2.7.4.1.zip (see instructions for applying).

To test, either make an edit to the meeting invite in Outlook for which the time is wrong in Google and then do a normal delta sync, or perform a full sync by holding the Shiftkey whilst clicking Sync.

Please let me know how it goes.

@phw198 phw198 added the waiting fix confirmation Hotfix available for testing label May 24, 2018
@gconry18
Copy link

@phw198 I gave this a test with my work calendar this morning. The same issue persists with one of my events but others have been corrected.

@phw198
Copy link
Owner Author

phw198 commented May 31, 2018

@gconry18 So the one event remaining, does the Outlook appointment have the message "This meeting has been adjusted to reflect your current timezone" when you open it? And with OGCS logging at FINE and you make an edit (eg add a space to the location field) and save it, what does the logfile capture on the next sync?

@gconry18
Copy link

gconry18 commented May 31, 2018

@phw198 The meeting in outlook does indeed have that message.
image

Adding a space to the location and running a sync I see the following in the log file:

2018-05-31 17:45:29,771 FINE  10 OutlookGoogleCalendarSync.OutlookOgcs.OutlookNew [0] -  Meeting organiser is someone else - checking their timezone.
2018-05-31 17:45:29,792 DEBUG  10 OutlookGoogleCalendarSync.OutlookOgcs.OutlookNew [0] -  Retrieving the meeting organiser's timezone details.
2018-05-31 17:45:29,792 ERROR  10 OutlookGoogleCalendarSync.OGCSexception [0] -  System.NullReferenceException: Object reference not set to an instance of an object.
2018-05-31 17:45:29,792 ERROR  10 OutlookGoogleCalendarSync.OGCSexception [0] -  Code: 0x80004003;-2147467261
2018-05-31 17:45:29,792 ERROR  10 OutlookGoogleCalendarSync.OutlookOgcs.OutlookNew [0] -  Failed to retrieve organiser's timezone.
2018-05-31 17:45:29,799 FINE  10 OutlookGoogleCalendarSync.OutlookOgcs.OutlookNew [0] -  Timezone "(UTC+02:00) Harare, Pretoria" mapped to "Africa/Johannesburg"
2018-05-31 17:45:29,807 FINE  10 OutlookGoogleCalendarSync.OutlookOgcs.OutlookNew [0] -  Timezone "(UTC+02:00) Harare, Pretoria" mapped to "Africa/Johannesburg"

@phw198
Copy link
Owner Author

phw198 commented May 31, 2018

📦 Could you apply hotfix v2.7.4.3.zip (see instructions for applying) and repeat the test - it seems it's failing to convert a timezone name into a matching ID...

@gconry18
Copy link

gconry18 commented Jun 1, 2018

Still failing to convert

2018-06-01 09:41:15,892 DEBUG  19 OutlookGoogleCalendarSync.OutlookOgcs.OutlookNew [0] -  Retrieving the meeting organiser's timezone ID.
2018-06-01 09:41:16,020 WARN  19 OutlookGoogleCalendarSync.OutlookOgcs.OutlookNew [0] -  Failed to get the organiser's timezone ID for Eastern Standard Time
2018-06-01 09:41:16,021 ERROR  19 OutlookGoogleCalendarSync.OGCSexception [0] -  System.NullReferenceException: Object reference not set to an instance of an object.
2018-06-01 09:41:16,022 ERROR  19 OutlookGoogleCalendarSync.OGCSexception [0] -  Code: 0x80004003;-2147467261

Something to note, not sure if this helps.
If I open the series:
image
If I open an occurrence:
image

@phw198
Copy link
Owner Author

phw198 commented Jun 1, 2018

Sorry, should have said v2.7.4.3 wouldn't fix it, just report the timezone that's got the problem (though I now see it's also in your screenshot 😳).

📦 Anyway, hotfix v2.7.4.5.zip should now fix it.

@gconry18
Copy link

gconry18 commented Jun 1, 2018

@phw198 Success! Thank you so much!

@phw198 phw198 added resolved Working hotfix available and removed waiting fix confirmation Hotfix available for testing labels Jun 1, 2018
@dtucny
Copy link

dtucny commented Jun 15, 2018

For me hotfix 2.7.4.5 resolves some of the cases for me, for the remaining ones I get the following logged:

2018-06-15 15:23:47,920 FINE  7 OutlookGoogleCalendarSync.OutlookOgcs.OutlookNew [0] -  Meeting organiser is someone else - checking their timezone.
2018-06-15 15:23:47,933 FINE  7 OutlookGoogleCalendarSync.OutlookOgcs.OutlookNew [0] -  Appointment's timezone: (UTC+08:00) Kuala Lumpur, Singapore
2018-06-15 15:23:47,934 FINE  7 OutlookGoogleCalendarSync.OutlookOgcs.OutlookNew [0] -  Organiser's timezone:   (GMT+10:00) AUS Eastern Standard Time
2018-06-15 15:23:47,934 DEBUG  7 OutlookGoogleCalendarSync.OutlookOgcs.OutlookNew [0] -  Retrieving the meeting organiser's timezone ID.
2018-06-15 15:23:47,934 FINE  7 OutlookGoogleCalendarSync.OutlookOgcs.Calendar [0] -  GetSummary - not all day event
2018-06-15 15:23:47,935 WARN  7 OutlookGoogleCalendarSync.Console [0] -  Could not determine the organiser's timezone. Google Event will have incorrect time.
2018-06-15 15:23:48,067 FINE  1 OutlookGoogleCalendarSync.Console [0] -  Console finished navigating
2018-06-15 15:23:48,306 ERROR  7 OutlookGoogleCalendarSync.OutlookOgcs.OutlookNew [0] -  No timezone ID exists for organiser's timezone (GMT+10:00) AUS Eastern Standard Time
2018-06-15 15:23:48,328 FINE  7 OutlookGoogleCalendarSync.OutlookOgcs.OutlookNew [0] -  Timezone "(UTC+08:00) Kuala Lumpur, Singapore" mapped to "Asia/Singapore"
2018-06-15 15:23:48,346 FINE  7 OutlookGoogleCalendarSync.OutlookOgcs.OutlookNew [0] -  Timezone "(UTC+08:00) Kuala Lumpur, Singapore" mapped to "Asia/Singapore"

Which looks like there's a problem determining what the timezone description means... This may be from webex sent invites...

@phw198
Copy link
Owner Author

phw198 commented Jun 15, 2018

Thanks @dtucny, I will take a look as soon as I can.

@phw198
Copy link
Owner Author

phw198 commented Jun 23, 2018

@dtucny So yes, a "timezone" with a GMT offset like that isn't a valid Windows timezone at all. However, "AUS Eastern Standard Time" on its own is, so I've taken the approach to strip any GMT offset (offsets if specified should always be UTC anyway).

📦 Therefore, please try with hotfix v2.7.4.7.zip (see instructions for applying).

Let me know how it goes.

@X-dark
Copy link

X-dark commented Nov 8, 2019

Still not working for me on 2.8.2.0.
I have a recurring event across DST and non DST periods. It get shifted by 1 hour on Google Calendar.
Both calendars are in Europe/Paris timezone.

Here is the log:

2019-11-08 10:53:53,059 DEBUG  19 OutlookGoogleCalendarSync.OutlookOgcs.OutlookNew [0] -  Retrieving the meeting organiser's timezone ID.
2019-11-08 10:53:53,059 WARN  19 OutlookGoogleCalendarSync.OutlookOgcs.OutlookNew [0] -  Could not find timezone ID based on given description. Attempting some fuzzy logic...
2019-11-08 10:53:53,059 DEBUG  19 OutlookGoogleCalendarSync.NotificationTray [0] -  Found a UTC timezone offset of 1
2019-11-08 10:53:53,059 WARN  19 OutlookGoogleCalendarSync.OutlookOgcs.OutlookNew [0] -  Could not find timezone with GMT offset of 1 for country (UTC+01:00) Brussels, Copenhagen, Madrid, Paris. Picking the first offset match regardless of country.

@phw198
Copy link
Owner Author

phw198 commented Nov 12, 2019

@X-dark that's because UTC+01:00 is not a valid timezone - you need to find out which service you are using that is putting duff data into your Outlook calendar...and stop using it 😝

Though seriously, I guess it's possible that the country that OGCS picked with an offset of UTC+01:00 does not observe daylight saving and the meeting organiser is in a country that does? Can you confirm this (ie check the timezone for the event in Outlook vs that in Google)?

@X-dark
Copy link

X-dark commented Nov 13, 2019

In Google, it is displayed as "(GMT+01:00) West Africa Standard Time - Lagos".

I think the event has been created with Microsoft Teams. I don't choose the tools (or I would have stopped to use MSFT tools altogether...).

@phw198
Copy link
Owner Author

phw198 commented Nov 13, 2019

OK, so Lagos apparently has never observed DST which is half of my suspicion confirmed. You said your Outlook calendar was in Paris timezone, but I need to know if the organiser of the appointment is in a DST timezone (which would cause the mismatch).

Could you turn your logging up to FINE and then resync the item to get more detailed logs. If you have one-way sync to Google, just delete the Google item and resync. If you have two-way, temporarily switch to one-way.

Thanks

@phw198
Copy link
Owner Author

phw198 commented Nov 13, 2019

💭 This issue already looks to be covered by #843

@X-dark
Copy link

X-dark commented Nov 14, 2019

OK, so Lagos apparently has never observed DST which is half of my suspicion confirmed. You said your Outlook calendar was in Paris timezone, but I need to know if the organiser of the appointment is in a DST timezone (which would cause the mismatch).

The organizer is in the same timezone. I'll get you some logs tomorrow (no access to this computer today).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something's not working right codeplex issue Originally raised as a bug on CodePlex recurring appointment resolved Working hotfix available timezones
Projects
None yet
Development

No branches or pull requests

7 participants