?
Solved

Update time on Solaris

Posted on 2007-08-01
4
Medium Priority
?
1,454 Views
Last Modified: 2013-12-27
Hi,
When I use the date command, my time is off by 30min. What is the command to update the time on my solaris machine?
Thanks
Jamie
0
Comment
Question by:jamie_lynn
  • 2
4 Comments
 
LVL 40

Assisted Solution

by:omarfarid
omarfarid earned 200 total points
ID: 19612759
Hi,

Use date command.

Useful link:

http://bama.ua.edu/cgi-bin/man-cgi?date+1
0
 
LVL 38

Expert Comment

by:yuzh
ID: 19613975
It is better to use "rdate" to get the correct time from the other
*nix box, or "ntpdate" to get time from a NTP server.

login as root, type in:

eg:
/usr/bin/rdate  timeservername
 /usr/sbin/ntpdate ntpserver

man rdate
man ntpdate
to learn more details.

you can put it in the crontab.
0
 

Author Comment

by:jamie_lynn
ID: 19620879
What is the exact command to add 30 min? Do I have to type in the the entire time format?
Thanks
Jamie
0
 
LVL 38

Accepted Solution

by:
yuzh earned 300 total points
ID: 19622346
>>What is the exact command to add 30 min? Do I have to type in the the entire time format?

No,   to set the current time, you can do:
 
example# date 1234.56
to sets the current time to 12:34:56.

man date
to learn more details.

BTW, why not use "rdate" or "ntpdate" to sync the time with a
Time server?
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses
Course of the Month14 days, 15 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question