Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d8d1e5d authored by Fabrice Di Meglio's avatar Fabrice Di Meglio
Browse files

Fix bug #2585298 (google calendar sync clears eventTimezone field for recurring allDay events)

- fix RecurrenceSet so that all day recurring events have a UTC timezone set
- code formatting

Change-Id: Iaa622a696d9d995d9921dd721130ef02dc64aa6b
parent 75b84a2d
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -181,7 +181,9 @@ public class RecurrenceSet {
        boolean inUtc = start.parse(dtstart);
        boolean allDay = start.allDay;

        if (inUtc) {
        // We force TimeZone to UTC for "all day recurring events" as the server is sending no
        // TimeZone in DTSTART for them
        if (inUtc || allDay) {
            tzid = Time.TIMEZONE_UTC;
        }
                
@@ -204,9 +206,6 @@ public class RecurrenceSet {
        }
        
        if (allDay) {
        	// TODO: also change tzid to be UTC?  that would be consistent, but
        	// that would not reflect the original timezone value back to the
        	// server.
            start.timezone = Time.TIMEZONE_UTC;
        }
        long millis = start.toMillis(false /* use isDst */);