Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

set time on linux

Posted on 2002-03-19
4
Medium Priority
?
510 Views
Last Modified: 2010-04-21
How do I set the time on linux?  If I type "date" it returns the wrong time.  I did a man on "date", but didn't see a way to change the time.

Thanks,

Lisa
0
Comment
Question by:lphillips120898
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 1

Expert Comment

by:smisk
ID: 6880766
It may depend on which flavor of Unix you are using, but on Linux :

linux:~ # date -s '3/19/2002 15:10:30'
Tue Mar 19 15:10:30 EST 2002

On Aix :

aix:~ # date 0217142590
This sets the date and time to Sat Feb 17 14:25:00 CST 1990.

Are you sure "man date" didn't give you this information?
0
 
LVL 1

Expert Comment

by:Sixpax
ID: 6881094
Setting the date/time using the "date" command doesn't necessarily adjust the system clock, so when you reboot the machine you might very well have the wrong date/time again.

Try "man hwclock".
0
 

Author Comment

by:lphillips120898
ID: 6882659
I actually had to use a combination of both of these to accomplish what I wanted... i.e. set the time now and have it "stick" upon reboot.  I would like to split the points.

I still have one slight problem... one of the boxes shows EST and the other PST when I do "date".  How can I change this to be EST?
0
 
LVL 1

Accepted Solution

by:
Sixpax earned 400 total points
ID: 6885935
man timeconfig
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
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.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

704 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