myuhe / org-gcal.el

Org sync with Google Calendar
450 stars 113 forks source link

Double timestamps and properties drawers when GCal and org-mode in different timezones #121

Closed phrxmd closed 5 years ago

phrxmd commented 5 years ago

I get calendar entries with double properties drawers and two different timestamps when org-mode and Google Calendar are in different timezones.

Steps to reproduce the problem: Local time in CET, Google Calendar in GMT+6. Capture the following appointment:

* Timezone test event

Local time in CET (GMT+1)
Google Calendar in GMT+6

<2018-12-07 Fr 11:00>

:PROPERTIES:

:END:

Finish with C-c C-c. Synchronize with Google Calendar. The event in the agenda now looks as follows:

* Timezone test event
  :PROPERTIES:
  :LINK: [[https://www.google.com/calendar/event?eid=very-long-id-string][Go to gcal web page]]
  :ID: 9cfarup88kgb31j7srl63i834c
  :END:

  <2018-12-07 Fr 16:00>

Local time in CET (GMT+1)
Google Calendar in GMT+6

<2018-12-07 Fr 11:00>

:PROPERTIES:

:END:

Note how the event has two properties drawers and two timestamps that are different by 5 hours (the difference between CET and GMT+6).

phrxmd commented 5 years ago

Note: my capture template looks like this:

'(("a" "Appointment" entry (file  "~/path-to-file.org" )
   "* %?\n\n%^T\n\n:PROPERTIES:\n\n:END:\n\n")

It looks like org-gcal ignores the existing timestamps and properties drawers.

phrxmd commented 5 years ago

Fixed in pull request https://github.com/myuhe/org-gcal.el/pull/122 (changed the regular expression that led to double property drawers)