http://www.dclabs.com.au

Question: How do I set the date and time on a DCSERVER?
Answer:
To check the current time on a server, type:

date

To check the hardware clock, type:

hwclock

To set the correct time via the internet type:

/etc/rc.d/init.d/xntpd restart

OR

/etc/init.d/ntp restart

To set the time/date manually type:

date -s 'MM/DD/YYYY HH:MM'
e.g.
date -s 17/09/01
date -s 17:50

To set the hardware clock to be the same as the system clock, type:

hwclock --utc --systohc

SEE ALSO: How do I set the timezone on a DCServer?

NOTES: Make sure /etc/default/rcS that UTC is set to yes.

-----
The command below must return the time in UTC.

$ hwclock --localtime

The command below must return the time in AEST (or what ever your timezone is)

$ hwclock

If these commands do not return the correct time, follow this steps below

1) Set hwclock --localtime to UTC

$ hwclock --localtime --set --date 00:14

* 00:14 is the time in UTC

2) Set system clock to AEST

$ date -s 10:14

* 10:14 is the time in AEST

3) Set hwclock to be the same as the system clock
$ hwclock --systohc --utc

4) Below command should return UTC time

$ hwclock --localtime

5) Below command should return AEST time

$ hwclock

--
Rene (5/5/04)