06-23-2002
In Linux you can use dateconfig command. Note it vary with your Linux Kernel version, as i noticed they no longer using timetool (Old kernel supported ). Start the dateconfig on your shell and change the date & time.
Also take note:
Changing the date and time will change the system clock as well as the hardware clock. Clicking Apply is equivalent to executing the date and hwclock commands with the selected date and time.
The Network Time Protocol (NTP) daemon synchronizes the system clock with a remote time server or time source (such as a satellite). dateconfig allows you to configure a NTP daemon to synchronize your system clock with a remote server. To enable this feature, click the Enable Network Time Protocol button. This will enable the Server pulldown menu. You can choose one of the predefined servers or type a server name in the pulldown menu. Your system will not start synchronizing with the NTP server until you click Apply. After you click Apply, the configuration will be saved and the NTP daemon (ntpd) will be started (or restarted if it is already running). If you want this daemon to start automatically at boot time, you need to execute the command /sbin/chkconfig --level 345 ntpd on to enable ntpd for runlevels 3, 4, and 5.
For more information on NTP, read the NTP documentation available in the /usr/share/doc/ntp-version-number directory.
6 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi
I'm trying to change my sys clock from PST to UTC.
I've read the man date page
it helpfully says :-
-u, --utc, --universal
print or set Coordinated Universal Time
as root I have tried date --universal, date -u, date --utc,
I have checked the /etc/sysinfo/clock file the... (5 Replies)
Discussion started by: OFFSIHR
5 Replies
2. UNIX for Dummies Questions & Answers
Dear Expert,
Is there a command to do that in Unix?
In such a way that we don't need to actually "write" or
modified the content.
-- monkfan (4 Replies)
Discussion started by: monkfan
4 Replies
3. Solaris
Hi,
I would like to rename log files with sys date as extension.
eg xyz.log --> xyz.log.01-21-2011
How do I do this? Any hints? (1 Reply)
Discussion started by: neil.k
1 Replies
4. Windows & DOS: Issues & Discussions
Hi All,
I wanted to run a small socket application written in C on windows.
The code was written for GNU/linux..the compiler on windows CodeBlocks complains about the sys headers.
is there an equivalent for windows ? (4 Replies)
Discussion started by: coolatt
4 Replies
5. UNIX for Beginners Questions & Answers
Hi All,
I have a CSV file which is as below. Basically I need to take the year column in it and find if the year is >= 20152 . If that is then I should subtract all values by 6. In the below example in description I am having number mentioned as YYWW so I need to subtract those by -5. Whereever... (8 Replies)
Discussion started by: arunkumar_mca
8 Replies
6. Shell Programming and Scripting
i try to set linux date & time in specific format but it keep giving me error
Example :
date "+%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01"
or
date +"%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01"
keep giving me this error :
date: invalid date ‘19-01-2017 00:05:01'
Please use CODE tags... (7 Replies)
Discussion started by: umen
7 Replies
NTPD(8) System Manager's Manual NTPD(8)
NAME
ntpd - "Network Time Protocol daemon"
SYNOPSIS
ntpd [-dnSsv] [-f file]
DESCRIPTION
The ntpd daemon synchronizes the local clock to one or more remote NTP servers or local timedelta sensors. ntpd can also act as an NTP
server itself, redistributing the local time. It implements the Simple Network Time Protocol version 4, as described in RFC 2030, and the
Network Time Protocol version 3, as described in RFC 1305.
ntpd uses the adjtime(2) system call to correct the local system time without causing time jumps. Adjustments larger than 128ms are logged
using syslog(3) with LOG_INFO priority. The threshold value is chosen to avoid having local clock drift thrash the log files. Should ntpd
be started with the -d option, all calls to adjtime(2) will be logged.
When ntpd starts up, it reads settings from a configuration file, typically ntpd.conf(5).
The options are as follows:
-d Do not daemonize. If this option is specified, ntpd will run in the foreground and log to stderr.
-f file
Use file as the configuration file, instead of the default /etc/openntpd/ntpd.conf.
-n Configtest mode. Only check the configuration file for validity.
-S Do not set the time immediately at startup. This is the default.
-s Set the time immediately at startup if the local clock is off by more than 180 seconds. Allows for a large time correction, elimi-
nating the need to run rdate(8) before starting .
-v This option allows ntpd to send DEBUG priority messages to syslog.
When ntpd receives a SIGINFO signal, it will write its peer and sensor status to syslog.
FILES
/etc/openntpd/ntpd.conf
default ntpd configuration file
/var/lib/openntpd/ntpd.drift
drift file, written by ntpd periodically and used at startup to get the initial clock drift
SEE ALSO
date(1), adjfreq(2), adjtime(2), ntpd.conf(5), rdate(8), timed(8)
, Network Time Protocol (Version 3), March 1992.
, Simple Network Time Protocol (SNTP) Version 4, October 1996.
HISTORY
The ntpd program first appeared in OpenBSD 3.6 .
$Mdocdate: November 10 2007 $ NTPD(8)