-   Slackware (
-   -   Date/Time in Slackware 12.0 (

JMJ_coder 05-16-2008 10:17 AM

Date/Time in Slackware 12.0

Still running 12.0 and I have a question on the date/time function. I also use NetBSD and I noticed that the time was three hours behind (i.e., shows 8:00a, but really 11:00a). So I used the date string command to reset the clock to the correct time. Now, the time in Slackware is three hours ahead (i.e., shows 11:00a, but really 8:00a). As far as I know, both are set to the same timezone (Eastern Time - America/New_York).

Does anyone know how to resolve this difference?

dracolich 05-16-2008 10:23 AM

I solved a similar issue earlier this year by using the --localtime parameter with the date command. Something like this:


date --localtime --set 08:00
I always follow a date command with hwclock --systohc

I'm writing this from memory so my syntax may be slightly incorrect

T3slider 05-16-2008 02:46 PM

You should make sure the permissions are correct on /etc/localtime (readable by others). Also, when setting the date/time you can either store the local time in the hardware clock or you can store it in UTC. Be sure to run `hwclock --systohc` as dracolich said above to sync the software time with the hardware clock.

JMJ_coder 05-17-2008 07:10 PM


I was able to resolve this by adding rtclocaltime=YES to the /etc/rc.conf file on NetBSD. Now both systems are set to the same correct time.

Thanks for the suggestions.

All times are GMT -5. The time now is 07:33 AM.