Page 1 of 1

EasyOS won't save daylight saving time (Solved)

Posted: Mon Apr 10, 2023 2:12 pm
by stevie pup

I decided to give EasyOS another try out a few days ago. I first tried it some time last year, but unfortunately it was a dismal failure. Can't remember now what the issues were but there were quite a few of them. Looking back some of it could well have been a hardware problem as the laptop I was using at the time died completely a couple of months later.

Pleased to say almost everything appears to be ok with my latest attempt except for one small niggle. It won't save the clock time! Every time I boot it up the clock is an hour out, as though it isn't recognising British Summer Time. I always "save session", and any other settings I make are always saved, just not the time. So I reset it, and next time I boot it's back to being an hour out.

Perfectly possible that I'm missing something, or doing something daft. Anyone got any ideas and/or suggestions?

Thanks


EasyOS Clock

Posted: Mon Apr 10, 2023 3:50 pm
by pp4mnklinux

It's only an idea, because I never worked with EASYos (only to choose the logo viewtopic.php?p=83069#p83069 ) but it continues happening when you chose the option "update clock everytime you connect to the internet"??

In puppy you can choose this option when first boot.


Re: EasyOS won't save daylight saving time

Posted: Mon Apr 10, 2023 8:07 pm
by Keef

Use Qsync from the Date and Time Setup. Find it either in the main menu under Setup, or click on the time in the taskbar.


Re: EasyOS won't save daylight saving time

Posted: Tue Apr 11, 2023 5:05 am
by FeodorF

@stevie pup

Adding this script to /root/Startup will fix your problem.
(Simply remove the fake .gz before use.)

set-UTC-time-for-my-country.gz
(83 Bytes) Downloaded 33 times

If you run Menu > Setup > Quick Setup > Europe/London plus UTC option everything will be saved and read after the reboot correctly now.

btw: my RTC is set to UTC + 0 to do the above


Re: EasyOS won't save daylight saving time

Posted: Tue Apr 11, 2023 10:23 am
by stevie pup

Thank you all for your suggestions. But would you believe it, I've just booted Easy again and this time it's defaulted to correct time, yet I haven't tried anything or changed any settings. Something very weird going on here. So I will leave it alone for now and see what happens next time I boot it.


Re: EasyOS won't save daylight saving time

Posted: Thu Apr 13, 2023 12:54 pm
by BarryK
stevie pup wrote: Tue Apr 11, 2023 10:23 am

Thank you all for your suggestions. But would you believe it, I've just booted Easy again and this time it's defaulted to correct time, yet I haven't tried anything or changed any settings. Something very weird going on here. So I will leave it alone for now and see what happens next time I boot it.

Curious.

Yes, as Keef posted, Setup -> Date and Time Setup and choose Qsync
Then it will set time from the Internet.


Re: EasyOS won't save daylight saving time (Solved; fixed itself.)

Posted: Fri Apr 14, 2023 7:11 am
by BarryK

The 'init' script in the initrd is supposed to set the system time when reboot. Here is the relevant code:

Code: Select all

if [ -e /sys/class/rtc/rtc0 ];then
 if [ -s /mnt/${WKG_DEV}/${WKG_DIR}.session/etc/clock ];then
. /mnt/${WKG_DEV}/${WKG_DIR}.session/etc/clock #has HWCLOCKTIME=localtime or utc
  #20230414 not sure if busybox hwclock accepts "--localtime" use "-l"...
  case "$HWCLOCKTIME" in
   localtime) hwclock -s -l -f /dev/rtc0; CLKflg=$? ;;
   utc)       hwclock -s -u -f /dev/rtc0; CLKflg=$? ;;
  esac
 else #first bootup, assume hw clock is localtime...
  hwclock -s -l -f /dev/rtc0
 fi
fi

I have replaced "--localtime" with "-l", don't know if that will fix it.

Another possibility is that /sys/class/rtc/rtc0 does not exist that early in bootup.
Maybe a kernel device driver has to get loaded before that appears.

Actually, you can find out. menu "Shutdown -> Rectify -> Reboot to initrd"
Choose the first radiobutton, then reboot.

At bootup, it will drop out to a terminal in the initrd, and you can see if /sys/class/rtc/rtc0
and /dev/rtc0 exist.


Re: EasyOS won't save daylight saving time (Solved)

Posted: Fri Apr 14, 2023 10:23 am
by stevie pup

Looks like it hadn't fixed itself. Next time I booted it up the time was back to being an hour out, so I set Qsync. Next time I booted it was an hour out again! So I set Qsync again, and now it appears to be behaving itself.

All I can think is that I didn't save session the first time I set Qsync, although that doesn't explain how it managed to put itself right on just the one occasion.

I will keep an eye on it and hope for the best, and if it goes haywire again (to quote Arnie) "I'll be back". :)