The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. October 14, 2019, 06:00:20 PM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Synchronizing time under linux  (Read 2339 times)
thedarkness
Lifer
*****
Offline Offline

Posts: 585



View Profile
« on: April 25, 2007, 07:45:23 PM »

Put this in a daily cron job to synchronize your system time. If your hardware clock (BIOS clock) is NOT set to GMT (UTC) remove the --utc from the call to hwclock. Ntpdate syncs system time with the time server, hwclock syncs system time with the hardware clock.

Code:
#!/bin/bash

/usr/sbin/ntpdate -s time.nist.gov > /dev/null 2>&1
/sbin/hwclock --utc --systohc
Logged

"I want to be the guy my dog thinks I am."
 - Unknown
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!