Skip to content

Timezone is ignored when importing an .ics file #71

Description

@max-baz

Checklist

  • I can reproduce the bug with the latest version.
  • I made sure that there are no existing issues - open or closed - to which I could contribute my information to.
  • I have read the FAQ and my problem isn't listed.

I'm actually not sure what FAQ this refers to... this one? Could you please add a link? 🙂

  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.

The link on "contributions guidelines" points to the same FAQ page... ?

Describe the bug
Importing an .ics ignores the timezone, resulting in an event saved with a wrong time.

This is likely a duplicate of SimpleMobileTools/Simple-Calendar#1795, I apologize if I should not have created an issue in this repo, I couldn't find any policy about this. The bug is valid and important for anyone who works across time zones, so I hope there's value in tracking it here.

To Reproduce

  1. Take this invite.ics created by Google Calendar. The event is scheduled for 11:45 EET / 10:45 CET.
BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:REQUEST
BEGIN:VTIMEZONE
TZID:Europe/Athens
X-LIC-LOCATION:Europe/Athens
BEGIN:DAYLIGHT
TZOFFSETFROM:+0200
TZOFFSETTO:+0300
TZNAME:EEST
DTSTART:19700329T030000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0300
TZOFFSETTO:+0200
TZNAME:EET
DTSTART:19701025T040000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
DTSTART;TZID=Europe/Athens:20240116T114500
DTEND;TZID=Europe/Athens:20240116T124500
DTSTAMP:20240115T103216Z
ORGANIZER;CN=John Smith:mailto:john@smith.com
UID:888888@google.com
CREATED:20240115T084412Z
DESCRIPTION:-::~:~::~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~
 :~:~:~:~:~:~:~:~::~:~::-\nExample\n-::~:~::~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:
 ~:~:~:~:~:~:~:~:~:~:~:~:~:~::~:~::-
LAST-MODIFIED:20240115T103215Z
LOCATION:Online
SEQUENCE:1
STATUS:CONFIRMED
SUMMARY:Meeting
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR
  1. Tap on the file, and use Fossify Calendar to open it.

Expected behavior
The event is saved at 11:45 EET / 10:45 CET, regardless of your local time zone.

Actual behavior
The event is saved at 11:45 of your phone's timezone - so if you phone is set to use CET, it will save it at 11:45 CET.

Workaround

  1. On step 2 of repro steps, pick Etar instead of Fossify Calendar.
  2. After Etar parses the event, it will again offer to pick a calendar app - now pick Fossify Calendar.
  3. Thanks to Etar's correct parsing, Fossify Calendar will offer to save event at 10:45 CET as expected.

Screenshots
N/A

Device info (please complete the following information):

  • Model: Pixel 7a
  • OS: Android 14
  • App version 1.0.2 from IzzyOnDroid

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is not working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions