Solved

set time on linux

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

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Suggested Solutions

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
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…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

735 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