Solved

set time on linux

Posted on 2002-03-19
4
489 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
  • 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 100 total points
ID: 6885935
man timeconfig
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
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 get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

707 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

16 Experts available now in Live!

Get 1:1 Help Now