Page 1 of 1
EasyOS incorrectly changing HWClock.
Posted: Mon Apr 26, 2021 2:58 am
by TerryH
I run my Dell laptop with time set to local time (Canada/Eastern) on first run setup. After booting EasyOS Dunfell 2.7.2 which is instaĺled on a USB flash drive, checking the HWClock, shows it displaying a time that is 1 day 3 hours (27 hours) in advance of current local time. I have set the time through BIOS Update and also using the hwclock program, after rebooting it is set back to being incorrect.
This is not an an issue that seems related to UTC / local time, as the difference appears to have no apparent relationship to UTC. This does not occur with other linux installations used on the laptop.
Code: Select all
# date
Sun 25 Apr 2021 08:37:43 PM EDT
# hwclock -r
2021-04-26 23:37:47.213554-04:00
# cat /etc/adjtime
0.000000 1619396715 0.000000
1619396715
LOCAL
# cat /etc/timezone
Canada/Eastern
# cat /etc/clock
#this is read/written by /usr/sbin/quicksetup, timezone-set
HWCLOCKTIME='localtime'
Re: EasyOS incorrectly changing HWClock.
Posted: Mon Apr 26, 2021 10:27 am
by BologneChe
@TerryH
If you use Qsync?
PupControl - Paramètres - Synchroniser - Qsync
Re: EasyOS incorrectly changing HWClock.
Posted: Mon Apr 26, 2021 10:29 am
by FeodorF
Hi TerryH,
this fly is easy to kill.
Open the Initrd and change the following entry in the init script:
export TZ='XXX-23' to export TZ='EDT'
After the reboot /var/log/messages will show that the timezone/time is setup correctly from now on.
Re: EasyOS incorrectly changing HWClock.
Posted: Mon Apr 26, 2021 3:30 pm
by TerryH
FeodorF wrote: ↑Mon Apr 26, 2021 10:29 am
Hi TerryH,
this fly is easy to kill.
Open the Initrd and change the following entry in the init script:
export TZ='XXX-23' to export TZ='EDT'
After the reboot /var/log/messages will show that the timezone/time is setup correctly from now on.
Thanks for the fix. I didn't do it exactly as you advised. I used the TZ code from fossapup64 instead, to get a non-specific fix:
Code: Select all
[ "$TZ" ] && export TZ
hwclock -l -s
This will have to be fixed for all releases going forward, so it should be reviewed as a bug. I would think that if other people checked the Hardware clock that they would find this issue also.
Re: EasyOS incorrectly changing HWClock.
Posted: Tue Apr 27, 2021 1:37 am
by BarryK
I will need to review that code, but do note that the first time you boot Easy, the QuickSetup window has a checkbox to select whether the hardware clock is UTC or local time.
It defaults to local time, as that is what Windows used to expect. But that was many years ago, so what is the default for Windows now -- when you buy a laptop or PC with Windows, is the hardware clock set to local time or UTC?
Anyway, when the QuickSetup window appears, tick that checkbox if you want UTC.
You can run QuickSetup anytime, it is in the Setup menu.
From memory, I don't think that the hardware clock is changed prior to QuickSetup running, so if you choose your timezone from the dropdown list, and tick UTC, all should be fine.