LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   linux time changes 1 hour -- after reboot (https://www.linuxquestions.org/questions/linux-software-2/linux-time-changes-1-hour-after-reboot-239868/)

mrconover 10-07-2004 11:47 AM

linux time changes 1 hour -- after reboot
 
we are running a linux rsync server where keeping accurate dates and times is essential. today after rebooting the linux box, which has not occured in a few weeks the times of the files on our rsync shares is 1 hour retarded from before reboot? How can this happen? Is there any way to correct this? Is there any way of mass changing time stamps? Help.

mcleodnine 10-07-2004 12:11 PM

You can set the date with the 'date' command or, use 'ntpdate clock.server.name', or 'netdate clock.server.name' (you'll need to find either a local or remote time server to get the correct time).

after you have the correct time, update your compter's clock with 'hwclock -w'

To change all the timestamps in question, try 'touch filename'

mrconover 10-07-2004 01:34 PM

its not that my time is wrong or my hardware time is wrong I use ntp to sync the time and that has stayed constant, including hardware time. Touch looks like it could work if I can figure out a way to touch all files recursivley and start with that particular files time and not the systems at the time of execution. Any suggestions?

mrconover 10-07-2004 03:25 PM

figured out a solution - wrote a bash script using a for loop and touch.

Shade 10-07-2004 05:13 PM

Good solution, but the key is to figure out why you're having the problem. Often, it can indicate something else wrong.

Unfortunately, I don't have any ideas of where to look.

Good luck!

--Shade


All times are GMT -5. The time now is 11:55 AM.