elementary / greeter

Login and Lock Screen greeter for elementary OS and Pantheon, using LightDM
GNU General Public License v3.0
151 stars 39 forks source link

Time shown is incorrect by local TZ difference after resume from suspend #521

Open vjr opened 3 years ago

vjr commented 3 years ago

What Happened

When resuming from suspend the time label shows an incorrect time which is shifted ahead by the difference of the local timezone from UTC. For example if the current local time is 9 AM then the time displayed after resume is 2:30 PM.

Note that this only seems to occur if the RTC is previously set to local time using the command timedatectl set-local-rtc 1. It does not occur if the RTC is set to UTC (timedatectl set-local-rtc 0).

Also note an earlier PR which was merged to fix an issue: https://github.com/elementary/greeter/pull/472 At the time this issue did not occur, so not sure if it's a subsequent code change causing the issue, or there is an issue stemming elsewhere.

Expected Behavior

Time should be accurate regardless of RTC local setting when resuming from suspend.

Steps to Reproduce

  1. Suspend the computer and resume.
  2. Observe the time shown is shifted by the local timezone difference from UTC.
  3. This seems to occur only if RTC is set to local time with the command timedatectl set-local-rtc 1

Logs

(none observed) - please suggest where to look?

Platform Information

Up-to-date Odin early access installation.