LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-28-2003, 02:28 PM   #1
lel800
Member
 
Registered: Aug 2003
Distribution: Red Hat RHEL WS 3, RHEL WS 4
Posts: 228

Rep: Reputation: 30
Change system time or date or both


Hello,

How can I change the time and date on Linux?

Thank you in advance.
 
Old 10-28-2003, 02:39 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
look at the "date" command:
man date

or sync with an ntp server using:
ntpdate time.nist.gov
rdate -s time.nist.gov
 
Old 10-28-2003, 02:41 PM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
man date
man time
man hwclock

Here's and example:

date --set="Tue Jun 10 17:50:05"
 
Old 10-28-2003, 02:57 PM   #4
lel800
Member
 
Registered: Aug 2003
Distribution: Red Hat RHEL WS 3, RHEL WS 4
Posts: 228

Original Poster
Rep: Reputation: 30
Thank you both for your posts...

I did as david_ross suggested and checked the man pages. And there I found that I could use "--set" to set the date, passing in some string. I was confused about what sort of string to use.

Then I noticed the post by druuna and I used

date --set="Wed Oct 28 13:53:00"

I logged out and back in again and I noticed that it worked.

Thanks again to you.
 
Old 10-28-2003, 03:10 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally posted by druuna
Sorry, this is your first post I came across
and I'm TOO curious .... your nick is from
Serpieri's comics? :)

Your footer looks familiar :}

Cheers,
Tink
 
Old 10-28-2003, 06:29 PM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Yep. Guilty, I'm a big Druuna fan

I don't even remember where I got the sig. It's been so for the last 15 years or so. I know it's not mine, but cannot remember where I read it (anyone??).
 
Old 10-28-2003, 07:00 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally posted by druuna
Yep. Guilty, I'm a big Druuna fan :)
It's a bit chaotic but ummmmh, quite
exquisit drawing skills ... Paolo teaches
art somewhere in Italy, right?

As for the footer, I can't recall, either :}
/me is old ;)

Cheers,
Tink

P.S.: I apologise for the OT!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there an interactive way to change date/time from commandline? Akhran Linux - Newbie 1 10-13-2005 11:18 PM
Changing system date and time from KDE yapp Linux - General 4 04-17-2005 03:40 AM
how to change system time? date cmd? servnov Linux - Newbie 2 10-31-2004 03:07 PM
how to change date and time in slackware 8.1 erikm103 Linux - Newbie 4 02-25-2003 06:26 PM
how do you change the date / time? jkane Linux - General 2 01-15-2002 09:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration