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
Loading
Please register or sign in to comment