Linux datetime

From Noah.org
Revision as of 18:39, 1 December 2009 by Root (talk | contribs) (→‎UTC)
Jump to navigationJump to search

Set timezone and clock on Linux

1. su to root

2. Find your timezone file under /usr/share/zoneinfo. For example:

   /usr/share/zoneinfo/US/Pacific

3. OPTIONAL: backup the current timezone configuration:

   cp /etc/localtime /etc/localtime.old

4. Create a symbolic link from the appropiate timezone to /etc/localtime.

   ln -sf /usr/share/zoneinfo/US/Pacific /etc/localtime

or

   ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime

5. Use rdate or ntpdate to set the system time (ntpdate is better):

   /usr/sbin/ntpdate time.nist.gov

or

   /usr/bin/rdate time.nist.gov

6. Set the hardware clock to the system time:

   /sbin/hwclock --systohc

Correct for clock drift

For where its not possible to run ntpd you may use adjtimex to correct for systematic drift.

aptitude install adjtimex

NIST

time.nist.gov

Time Sync radio broadcasts

radio broadcasts of UTC time. Most consumer "atomic" clocks use WWVB for radio sync. Time signals can also be received through GPS receivers.

WWVB, Fort Collins, CO
60 kHz (binary carrier signal)
WWV, Fort Collins, CO
2500, 5000, 10000 and 15000 kHz (broadcasts voice)
WWVH, Kauai, HI
2500, 5000, 10000 and 15000 kHz (broadcasts voice)
CHU, Ottawa, Ontario, Canada
3330, 7335 and 14670 kHz (broadcasts voice)

UTC

UTC(GMT) EDT EST CDT CST MDT MST PDT PST
0000 8 PM7 PM6 PM5 PM4 PM
0100 9 PM8 PM7 PM6 PM5 PM
0200 10 PM9 PM8 PM7 PM6 PM
0300 11 PM10 PM9 PM8 PM7 PM
0400 Midnight11 PM10 PM9 PM8 PM
0500 1 AMMidnight11 PM10 PM9 PM
0600 2 AM1 AMMidnight11 PM10 PM
0700 3 AM2 AM1 AMMidnight11 PM
0800 4 AM3 AM2 AM1 AMMidnight
0900 5 AM4 AM3 AM2 AM1 AM
1000 6 AM5 AM4 AM3 AM2 AM
1100 7 AM6 AM5 AM4 AM3 AM
1200 8 AM7 AM6 AM5 AM4 AM
1300 9 AM8 AM7 AM6 AM5 AM
1400 10 AM9 AM8 AM7 AM6 AM
1500 11 AM10 AM9 AM8 AM7 AM
1600 Noon11 AM10 AM9 AM8 AM
1700 1 PMNoon11 AM10 AM9 AM
1800 2 PM1 PMNoon11 AM10 AM
1900 3 PM2 PM1 PMNoon11 AM
2000 4 PM3 PM2 PM1 PMNoon
2100 5 PM4 PM3 PM2 PM1 PM
2200 6 PM5 PM4 PM3 PM2 PM
2300 7 PM6 PM5 PM4 PM3 PM