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

Skip to content
Commit c18a5de5 authored by Neil Fuller's avatar Neil Fuller
Browse files

Disable kernel time zone offset-syncing behavior

Historically, Android's AlarmManagerService has tried to keep the kernel
informed when the current UTC offset might have changed, i.e. ultimately
it calls settimeofday() with a second argument.

The second argument contains a timezone struct containing the current
UTC offset (in seconds and reversed from the usual convention, i.e. US
time zones are considered a positive value). The struct technically
includes DST information but Android defaults this to 0.

Users of settimeofday() and gettimeofday() on Linux generally avoids use
of this time zone information as it is inherently not very useful.

AlarmManagerService's implementation is also imperfect: the current code
doesn't monitor the offset / next DST transition and so it will "miss"
the point when a DST transition occurs, leaving the offset incorrect
from that point. It does update the offset every 24 hours,
so it will eventually correct itself.

Rather than trying to improve the behavior, here we assume the behavior
is vestigial and unnecessary. It is disabled by this commit, but in a
way that can be restored easily later with a one-line change. It can be
stripped out fully in a later release.

Test: build / treehugger only
Bug: 246256335
Change-Id: I21efc63a232d52999b4b1c708441c01da91bfc73
parent 6bfc89fe
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