Skip to content

plugins/nightlight: Fix current time changing after updating transitions

Vlad Zahorodnii requested to merge work/zzag/night-light-wrong-current-time into master

When the slow update timer fires, it's going to pass m_next.first as the current time in order to calculate the next transition timings. After the timings have been calculated, the slow update timer will be started with an interval of "todayNow.msecsTo(m_next.first)". Since todayNow is a reference to m_next.first, the time diff will be 0, which will throw off the night light manager. To fix that, make a copy of m_next.first and then pass the copy as the current date time to resetSlowUpdateTimers().

BUG: 487901

Merge request reports