simonbengtsson / eventcal

Filter to only include attending and maybe facebook events in ical and google calendar
http://eventcal.flown.io
MIT License
212 stars 9 forks source link

Default timezone read by GCal is UTC, allow alternate default timezones? #33

Closed mpesavento closed 4 years ago

mpesavento commented 4 years ago

The Facebook event calendar filter has been really useful. However, there seems to be a mismatch between the default timezone created in the output calendar vs the target user timezone. This leads to some confusion when copying events from the EventCal to another Google Calendar.

As an example: A user creates a FB EventCal with this tool, which defaults the calendar to use UTC image This calendar is imported as a shared calendar in GCal. As a shared calendar, the user has no control of the default timezone. Because the calendar is shared, the user has no explicit control over events; all event times are pulled directly from Facebook. When an event is copied from the EventCal to a user's calendar (offering explicit control over event info), the default timezone is UTC, which shifts all times for the given event to UTC, rather than the target time zone.

A possible solution would be to allow users the opportunity to define the default timezone for their calendar when initially creating the filtered EventCal URL. This would then propagate forward into other calendars.

A challenge with this approach is a loss of flexibility for users that require multiple timezones.

simonbengtsson commented 4 years ago

Sounds like an interesting feature! I'm not sure I fully understand though. I tried to duplicating one of my facebook events to my personal calendar in google calendar. It seems even though the facebook calendar is in utc it showed the correct time in my personal one?

mpesavento commented 4 years ago

Correct, it does show the correct time in your personal one. I'm not clear on the mechanism behind why it still shows correctly. This TZ misalignment shows up in some calendar clients. For example, on android (Business Cal 2): Screenshot_20200220-084345 shows that the calendar event somehow gets the correct local time (PST), while the event itself has a "core" time defined in UTC. I'm not sure how an event can be explicitly defined in UTC and still be adjusted to local time. As I think about it, the problem may be that the event times are TZ aware, when they would probably be more stable if they were not TZ aware. So, removing the UTC timezone from all the events may "just work". Possibly worth testing?

simonbengtsson commented 4 years ago

Hmm, it seems correct? The event starts at 1pm local time right? Is what you want to hide the time below that time to make it less confusing to have two times? How does it look on an event that is not from facebook?

mpesavento commented 4 years ago

Yes, this screencap has the correct time somehow. But when I copy the event to a different calendar, it is taking the UTC time as the primary time, and using UTC as the time for the new event. To me, this makes it sound like the event times TZ aware and locked to UTC, and the calendar app has the responsibility of converting them to the local TZ.

My suggestion (and possibly a Bad Idea!) is to remove the TZ from the event times, thus letting the calendar app apply user-defined timezones as needed.

simonbengtsson commented 4 years ago

Yes. The event times are set in UTC in the facebook calendar. Hmm, interesting idea to strip the timezones from the facebook calendar. Without knowing the timezone the user is in however it would mean that the time for the event you posted would show up as 9pm instead of 1pm though. And the calendar app would not have the information to change it to 1pm. The only way would probably be to offer a timezone selector?

Out of curiosity - which calendar does not support UTC timezones?

mpesavento commented 4 years ago

Business Calendar 2 on android has a difficult time with timezones, though perhaps just for specific actions in copying an existing event to a different calendar. It DOES support UTC timezones, but has a hard time translating them to a local/default timezone. I think the relevant question is how do different calendar apps deal with an explicit UTC TZ, vs an implicit UTC TZ, vs an implicit local TZ, vs an explicit local TZ. I fully admit I don't know the best way to resolve those differences.

simonbengtsson commented 4 years ago

Verified now that Business Calendar 2 takes the UTC as local time when duplicating an event. Also verified that duplicate works correctly in Google Calendar app. I suggest you send a bug report to Business Calendar 2. I did so now as well.

simonbengtsson commented 4 years ago

I was in contact with Business Calendar support about this issue and they let me know that the app is actually working as expected. It is only showing the UTC time while editing the event. After saving it shows the local time as expected. You can also change the timezone while editing the event but then you would have to fix the time so the easiest solution is just to save the event as as in the utc timezone.