Update time on Solaris

Posted on 2007-08-01
Last Modified: 2013-12-27
When I use the date command, my time is off by 30min. What is the command to update the time on my solaris machine?
Question by:jamie_lynn
    LVL 40

    Assisted Solution


    Use date command.

    Useful link:
    LVL 38

    Expert Comment

    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:

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

    man rdate
    man ntpdate
    to learn more details.

    you can put it in the crontab.

    Author Comment

    What is the exact command to add 30 min? Do I have to type in the the entire time format?
    LVL 38

    Accepted Solution

    >>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?

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Suggested Solutions

    Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. Please see for the updated article. It is avail…
    Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
    Video by: Phil
    This video goes over how to configure and start a jail in FreeBSD.  This video is meant to supplement the article included with this course.

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now