Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add graphical method to set the timezone, time and add NTP #107

Open
shasheene opened this issue Jul 5, 2020 · 2 comments
Open

Add graphical method to set the timezone, time and add NTP #107

shasheene opened this issue Jul 5, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@shasheene
Copy link
Member

shasheene commented Jul 5, 2020

A user named dave duran on Rescuezilla's Sourceforge forum requested the ability to modify the time.

I responded:

Rescuezilla v1.0.6.1 does not yet have an easy-to-use graphical method to modify the time. It's possible to use the command-line to set the time using the date utility, but this will be too difficult for many users. I expect many of those who want to change the time in Rescuezilla may actually really want to change the timezone, as Rescuezilla sets its timezone to UTC+0 (Greenwich Mean Time Zone).

It's worth noting that when Rescuezilla boots it reads the time from the hardware clock built in to a computer's motherboard. This leads to funny situations because on Windows that value is set and read using local time, and on standard Linux environments that hardware clock value is set and read as UTC+0, with the timezone only applied after. This difference causes standard Windows and Linux dualboot environments to not display time correctly without careful configuration. There's no standard solution to this Windows/Linux time display issue, and it's not possible to handle the situation through autodetection. To avoid adding to this situation, Rescuezilla itself does not set the motherboard hardware clock, but it does read and interpret it.

An additional consideration is all changes made to Rescuezilla itself disappear on reboot, because as of writing Rescuezilla does not yet offer a persistent environment. (I will eventually implement a persistent environment as part of task #8).

I will add NTP (Network Time Protocol), so that the time (but not timezone) is automatically retrieved over the internet. Rescuezilla should definitely provide a graphical ability to set the time and timezone, in addition to a graphical method to select a keyboard layout (task #91).

(EDIT: While I note that the NTP utility is not installed, as far as I can tell the internal systemd-timesyncd background service is already providing Network Time Protocol client functionality)

This issue is relatively low priority until the Rescuezilla frontend has become an application worth being widely used.

To anybody reading this: feel free to comment with your input, choose reactions etc.

@shasheene shasheene added the enhancement New feature or request label Jul 5, 2020
@shasheene shasheene self-assigned this Jul 5, 2020
@zebradots
Copy link

zebradots commented Aug 23, 2020

Hi @shasheene,

FYI, for the time being Redo has elected to disable the time sync provided by systemd-timesyncd because it appears it can alter the time for Windows users (similar to what happens to those who dual-boot Linux and Windows). Since the timezone doesn't appear to be able to be autodetected (as evidenced by the fact that virtually every OS installer asks for this information), it may be prudent to simply ignore it for the short duration of the backup/restore operation. While it may be a little annoying to see an incorrect time on the taskbar, it's worse to have to re-set the system time after every backup. If there is a way to sync without causing this issue (e.g. set local RTC first), we are hoping to find out how, and will let you know if we do.

@shasheene
Copy link
Member Author

Thanks for raising this. I was aware that Windows machines set the hardware clock in localtime and Linux machines set it in UTC, but didn't realize systemd-timesyncd was modifying the hardware clock rather than just the system clock.

I agree the key is for the NTP update to occur without modifying the hardware clock. I might switch from using systemd-timesyncd to ntpd, with the kernel's "11 minute mode" synchronize disabled via running hwclock -hctosys (which Rescuezilla happens to already run at boot).

There are a lot of subtle considerations when it comes to system time (and NTP), so I will give it some thought.

shasheene added a commit to shasheene/rescuezilla-dev that referenced this issue Oct 13, 2020
Masks out the systemd-timesyncd service, which provides Network Time Protocol
time synchronization because it modifies the hardware clock (also known as the
RTC) even with `hwclock --hctosys` being set at boot.

There's no simple way around modifying the hardware clock whenever the Linux
kernel synchronizes time: it happens within the kernel and the only way to
change this behavior is use a kernel compiled with a certain flag, which is not
feasible at this stage due to Secure Boot considerations.

[1] rescuezilla#107
shasheene added a commit that referenced this issue Oct 14, 2020
Masks out the systemd-timesyncd service, which provides Network Time Protocol
time synchronization because it modifies the hardware clock (also known as the
RTC) even with `hwclock --hctosys` being set at boot.

There's no simple way around modifying the hardware clock whenever the Linux
kernel synchronizes time: it happens within the kernel and the only way to
change this behavior is use a kernel compiled with a certain flag, which is not
feasible at this stage due to Secure Boot considerations.

[1] #107
shasheene added a commit to shasheene/rescuezilla-dev that referenced this issue Dec 11, 2020
Moves the disabling of systemd services to after all apt operations have
completed, as in theory possible that subsequent apt-get installation
operations could re-enable the systemd-timesyncd service.

There is no evidence of this occurring, but still appropriate as a risk
reduction measure.

rescuezilla#107

rescuezilla#145
shasheene added a commit that referenced this issue Dec 11, 2020
Moves the disabling of systemd services to after all apt operations have
completed, as in theory possible that subsequent apt-get installation
operations could re-enable the systemd-timesyncd service.

There is no evidence of this occurring, but still appropriate as a risk
reduction measure.

#107

#145
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants