I changed from Ubuntu 20.04 to 24.04. Now the clock shows the wrong time (3 hours early). When I opened the system settings to fix this, the program crushes when I click on "Date and time". Can anybody help me?
I changed from Ubuntu 20.04 to 24.04. Now the clock shows the wrong time (3 hours early). When I opened the system settings to fix this, the program crushes when I click on "Date and time". Can anybody help me?
Open a terminal (bash prompt); a window with a
$
and a blinking cursor will appear...So, do not type
$
- that is "the prompt", to indicate what YOU are expected to type a command and arguments. The other lines comes as output from those 'commands'Note: hit Enter at the end of each command
Now; this will display the terse help page for date:
... the text beyond this tells a lot of detail.
Among that information you find that adding
-s
to the arguments will SET the time and date.Also note that you are likely to need a
sudo
to do that successfully, as that writes into the hardware RTC (real time clock).So a "sudo date -s [MMDDhhmm[[CC]YY][.ss]]" should do this: e.g.
$ sudo date -s 100410302024
for 2024-10-04@10:30.
Verify by a simple
$ date
to set the systemclock use ntpdate command that uses a pool of ntp servers in pool.ntp.org to set your time
After this, you need to set the hardware clock to the recently synced system time using
To set the clock automatically you should use systemd-timesyncd.service
then:
It seems like the timezone database on your system may not have the correct or complete information, or the necessary timezone files might not be installed. Here's a step-by-step guide to troubleshoot and fix this issue:
1.Check if the time zone is installed: First, check if the
tzdata
package, which provides timezone information, is installed and up-to-date.Run the following command:
This will ensure that the latest timezone data is installed.
2.List available time zones: Check if
Europe/Berlin
is listed among the available time zones:If
Europe/Berlin
is not listed, it means your system is missing the required timezone data or there’s an issue with the timezone database.3.Manually reconfigure tzdata (if needed): You can also manually reconfigure the
tzdata
package to ensure the correct timezone files are installed:During this process, you'll be prompted to select your region (e.g., Europe) and your city (e.g., Berlin).
4.Set the timezone again: Once you've verified that the timezone is available, try setting it again:
If everything is working properly, this command should now succeed without any error.
Let me know if the issue persists!