Setting the Computer Clock to GMT in SUSE Linux

Novell Cool Solutions: Feature

Digg This - Slashdot This

Posted: 27 May 2004

For SUSE Linux versions up to 7.3 change the file /etc/rc.config.
For SUSE Linux 8.0 and later, change /etc/sysconfig/clock as follows:

local: GMT="" GMT: GMT="-u"

Make sure you choose the right timezone.

To set the time, use the date command, such as "Thu Jul 10 19:09:00 MEST 1997":

date 071019091997
(Format: MMTTSSMMJJJJ ) or with the ISO-format:
date -s '1997-07-10 19:09:00' +'%Y-%M-%d %T'

Settings of the CMOS-clock

The clock command writes and reads the CMOS clock. If you choose GMT for the CMOS clock, you have to set the clock command always with -u. e.g.:

+/kfr $ clock -ur
Thu Jul 10 19:15:10 1997
+/kfr $ clock -r
Thu Jul 10 17:15:11 1997
+/kfr $
reads the appropriate timezone value and changes it to local time. Therefore the value is wrong. With
clock -uw
the CMOS clock receives its settings from the system clock.

Note: always choose Unix Single User Mode in the settings, in order to avoid problems with programs like make, rcs.

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© Micro Focus