I have changed the time in Ubuntu Server 11.04 but when i reboot it resets to the default it has. How to change the time that when I boot it stays like i changed it. already tried date
but I think this is only temporary.
-
Well when I type date I wanted to show the time I have in my country. But the timezone thing I did not think about it.– Luis AlvaradoJun 1, 2011 at 16:46
-
date is permanent if you are not using a timeserver and the correct timezone ;)– RinzwindJun 1, 2011 at 19:02
-
@Marco - Thank you the problem was in the timezone. I did 'sudo dpkg-reconfigure tzdata', selected the correct place and done. Works perfect after reboot. If you can put it as an answer i will voted up.– Luis AlvaradoJun 1, 2011 at 19:39
-
Answer added!– Marco CeppiJun 1, 2011 at 20:10
2 Answers
Sounds like you have a timezone issue. The easiest way to fix this is to reconfigure the tzdata
package sudo dpkg-reconfigure tzdata
There are alternative ways, like symlinking the correct zonefile from /usr/share/zoneinfo
to /etc/localtime
which will inform the system of the proper time:
ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
However, it's preferred to use dpkg-reconfigure
If your timezone is set up correctly, I think you have to adjust your hardware clock with the command hwclock
.