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

Skip to content
Commit 36fd35b4 authored by Yuri Lin's avatar Yuri Lin
Browse files

Handle several daylight savings related edge cases in ScheduleCalendar.

The core functionality changes that were previously broken that this change fixes are:
- a schedule such as 02:30-03:15 would incorrectly span the next full day on the day 2AM is skipped
- getNextChangeTime would return an incorrect time when called on the day clocks change when the next change is on the next day

The new behavior changes only when a schedule's start time is during a skipped hour; in those cases, the schedule then "begins" at the next valid time (3AM in the case of something that would start at 2:xx).

This change also adds a bunch of unit tests surrounding daylight savings time: schedule starts and ends on both daylight adjustment periods, and time adjustment in various time zones.

Test: atest ScheduleCalendarTest
Bug: 74521742
Change-Id: Ia59ef296a3b54de5cadccab82d87cbb81ded0733
parent 2f087e93
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment