elder_launcher icon indicating copy to clipboard operation
elder_launcher copied to clipboard

Wrong Time

Open itsarjunsinh opened this issue 4 years ago • 6 comments

A collection of reports about wrong time on the homescreen from users.

itsarjunsinh avatar Oct 12 '20 10:10 itsarjunsinh

July 7, 2020

App version: 1.0 Android version: 6.0 Device: ZTE K90 4G Automatic date & time: Yes Automatic timezone: Yes Fixed by Restart: No

App time: 3:57 AM, System time: 7:57 PM

itsarjunsinh avatar Oct 12 '20 10:10 itsarjunsinh

October 6, 2020

App version: Unknown Android version: Unknown Device: Unknown Devices tested: 2 Automatic date & time: Unknown Automatic timezone: Unknown Fixed by Restart: No

"The hours display is the same as the Android hours display above it but the minutes are stuck at 10 on both phones."

itsarjunsinh avatar Oct 12 '20 10:10 itsarjunsinh

October 11, 2020

App version: Probably 1.1.1 Android version: 7.1.1, 10 or 11 Device: BQ Aquarius U Plus, Xiaomi Mi 9 Lite Automatic date & time: Unknown Automatic timezone: Unknown Fixed by Restart: No

"There is a problem with time. It only updates once an hour, exactly each hour past ten."

itsarjunsinh avatar Oct 12 '20 10:10 itsarjunsinh

Analysis The reports from October 6 and 11 both have the same characteristics. Possible causes: Time being fetched only once an hour; Time being fetched every second but the minute value being stuck.

I can't reproduce any of these bugs on my own device.

itsarjunsinh avatar Oct 13 '20 13:10 itsarjunsinh

@itsarjunsinh have you tried displaying time with seconds and checking after sometime?

  • also do you think we have missed app running in background scenerio, I'm not sure wether it's applicable or not.
@override
  void didChangeAppLifecycleState(AppLifecycleState state) {
    print(state);
    if (state == AppLifecycleState.paused) {
     // stop the timer
    } else if (state == AppLifecycleState.resumed) {
      // update the timer
    }
  }

xscotophilic avatar Oct 26 '22 12:10 xscotophilic

Hi @xscotophilic, the second point you have raised is something worth looking into. https://github.com/itsarjunsinh/elder_launcher/blob/b7fad939cf488e06f846279fbdfa0be209626393/lib/providers/date_time_provider.dart#L12

The app updates the time every second. So, at first glance it would seem that even if the app might be resumed/brought back, the timer will be update automatically.. unless, Dart/Flutter doesn't automatically update the internal clock. Thanks a lot for the pointer, I really appreciate it.

itsarjunsinh avatar Nov 08 '22 08:11 itsarjunsinh