Diffusion KWin c265c7f2c698

[nightcolor] Use local time in Automatic and Location mode

Authored by zzag on Sep 22 2019, 6:15 PM.

Description

[nightcolor] Use local time in Automatic and Location mode

Summary:
Currently Night Color doesn't handle time zones very well. For example,
if the user's time zone is UTC-8, then computed timings of sunrise and
sunset (in UTC) will be a bit gibberish as sunset occurs before sunrise
rather than vice versa.

This change switches relevant parts of Night Color to local time in
order to fix expectations about the order of morning and evening in
updateSunTimings() method as well to simplify the code a bit (dealing
with UTC and local time can be painful sometimes).

CCBUG: 412211

Reviewers: KWin, romangg

Reviewed By: KWin, romangg

Subscribers: romangg, kwin

Tags: KWin

Differential Revision: https://phabricator.kde.org/D24153

Details