Time Gentlemen, time!

One of the interesting things to have raised its head with yesterdays Intermapper testing, is the timezone/time settings on agra. While being a minor issue previously, the date/time needs to be cleaned up for use with Intermapper. Agra was getting ahead of itself … at 11:49 AEST during a system update;

Current default timezone: 'Australia/Melbourne'.
Local time is now: Fri Apr 28 20:50:10 EST 2006.
Universal Time is now: Fri Apr 28 10:50:10 UTC 2006.
Run 'tzconfig' if you wish to change it.

When you installed the base system of Debian GNU/Linux, you set the Timezone.
You can check how you have set the Timezone by looking at the file /etc/timezone.
Changing the timezone after installation, Section 16.1.1.

agra:~# cat /etc/timezone

Timezone looks good, time is cactus.

agra:~# date --set 2006-04-28
Fri Apr 28 00:00:00 EST 2006
agra:~# date --set 11:52
Fri Apr 28 11:52:00 EST 2006

Next step is to clean up the hardware clock, which should be in UTC

agra:~# date
Fri Apr 28 11:57:58 EST 2006
agra:~# hwclock --systohc --utc

Use NTP you moron!
As I usually use NTP to configure the servers, I am not sure what happened with Agra. (Setting time using NTP) Install an NTP client, for example ntp or xntp3 in Debian version 2.1 and older.

agra:/etc# apt-get install ntp-simple
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
ntp ntp-server
Suggested packages:
ntpdate ntp-doc
The following NEW packages will be installed:
ntp ntp-server ntp-simple
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 152kB/407kB of archives.
After unpacking 934kB of additional disk space will be used.
Do you want to continue? [Y/n] y

Config details are stored in /etc/ntp.conf, add ntp.edfac and ntp.unimelb
Restart the daemon /etc/init.d/ntpdate restart

[1.] Debian GNU/Linux System Administrator’s Manual : Chapter 16 – Time
[2.] Package: ntp-simple
[3.] Package: ntp-doc
[4.] Package: ntp
[5.] Debian Setup: Helpful Daemons: ntp [metaconsultancy]

This entry was posted in geek. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.