Simple-Calendar icon indicating copy to clipboard operation
Simple-Calendar copied to clipboard

Timezone ignored when importing ICS, no option to edit this either.

Open ph00lt0 opened this issue 1 year ago • 8 comments

When importing ICS files as invites the timezone is completely ignored causing the appointments to be incorrectly added to the calendar. There is also no way to change the timezone of the appointments, this is rather confusing.

ph00lt0 avatar Aug 03 '22 13:08 ph00lt0

This is a pretty critical issue. I've missed a meeting because of it.

robsmith11 avatar Nov 03 '22 08:11 robsmith11

https://github.com/SimpleMobileTools/Simple-Calendar/blob/22ae8995fac01c3583dd266bfb9694844b8a0b96/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/IcsImporter.kt#L316 Here is the code that ignores timezone. I would guess part of the problem is that Simple Calendar treats timezone as a property of an event, whereas ICS treats timezone as a property of a timestamp (DTSTART and DTEND could have different timezones).

I expect the two options are

  1. use the timezone from DTSTART and adjust the DTEND time accordingly, or
  2. Refactor event timestamps to have timezones instead of the event itself

@tibbi does that sound right? I'm not much of a Kotlin / Android developer, but I could try my hand at either of those if you can say which you prefer.

Here is where we expect to get back DTSTART as a plain number: https://github.com/SimpleMobileTools/Simple-Calendar/blob/22ae8995fac01c3583dd266bfb9694844b8a0b96/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/IcsImporter.kt#L94

FortStatement avatar Nov 21 '22 20:11 FortStatement

every line is there for a reason. If you just remove it, it will break something else. Editing has to be done carefully too, cannot say much without testing it.

tibbi avatar Nov 21 '22 20:11 tibbi

It's clear that it all had its purpose, but this discrepancy should be solved and these are the two ways I can see of solving it, depending on whether ICS has the right idea about timezoned timestamps or Simple Calendar does.

FortStatement avatar Nov 21 '22 20:11 FortStatement

@robsmith11 agreed, but the author seems to think this is a "feature". I suggest moving to another app like I did too.

ph00lt0 avatar Nov 21 '22 21:11 ph00lt0

That response is pretty disappointing. What calendar app are you using @ph00lt0?

robsmith11 avatar Nov 22 '22 07:11 robsmith11

i use Etar @robsmith11

ph00lt0 avatar Nov 22 '22 14:11 ph00lt0

every line is there for a reason. If you just remove it, it will break something else. Editing has to be done carefully too, cannot say much without testing it.

Understood, maybe someone already removed or changed something making the timezone to be ignored now.

qustavo avatar May 25 '23 07:05 qustavo