EasyOS incorrectly changing HWClock.

Moderator: BarryK

Post Reply
TerryH
Posts: 568
Joined: Mon Jun 15, 2020 2:08 am
Has thanked: 99 times
Been thanked: 128 times

EasyOS incorrectly changing HWClock.

Post 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'

New Laptop - ASUS ZenBook Ryzen 7 5800H Vega 7 iGPU / 16 GB RAM

User avatar
BologneChe
Posts: 428
Joined: Sun Aug 23, 2020 12:29 am
Location: Stoneham, Québec
Has thanked: 250 times
Been thanked: 110 times

Re: EasyOS incorrectly changing HWClock.

Post by BologneChe »

@TerryH

If you use Qsync?

PupControl - Paramètres - Synchroniser - Qsync­

Attachments
Capture.jpg
Capture.jpg (93.17 KiB) Viewed 296 times

Born to lose; live to win

FeodorF
Posts: 161
Joined: Tue Jul 14, 2020 7:52 pm
Has thanked: 8 times
Been thanked: 24 times

Re: EasyOS incorrectly changing HWClock.

Post 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.

TerryH
Posts: 568
Joined: Mon Jun 15, 2020 2:08 am
Has thanked: 99 times
Been thanked: 128 times

Re: EasyOS incorrectly changing HWClock.

Post 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.

New Laptop - ASUS ZenBook Ryzen 7 5800H Vega 7 iGPU / 16 GB RAM

User avatar
BarryK
Posts: 2273
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 93 times
Been thanked: 564 times

Re: EasyOS incorrectly changing HWClock.

Post 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.

Post Reply

Return to “EasyOS”