Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Set Date in Linux

Posted on 2002-03-31
10
Medium Priority
?
855 Views
Last Modified: 2013-12-16
Hello Linux Experts,

Perhaps I would like to ask how I can set date in linux ?
For eg, in Dos, we can use

C:>Date
   Current date is 0-03-2002
   Enter new date (mm-dd-yy) : _


So for linux how do we set it ?

Thank you
Derrick Koay
0
Comment
Question by:dekoay
[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
10 Comments
 
LVL 5

Accepted Solution

by:
paulqna earned 200 total points
ID: 6910014
To enter a date for 25th of december at 23:15 do:

date 12252315

or do:

man date

to see all the other options available...

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6910347
keep in mind that  date  , unlike to DOS' date, just sets the OS' time, the BIOS clock (RTC) remains unchanged.
Also see  man date  and check for the  -u  option.

If you want to st the RTC, see   man hwclock
0
 
LVL 4

Expert Comment

by:svindler
ID: 6927533
I strongly suggest you use ntp to set the time.
This automatically updates your clock, using publicly accessible time servers.
See www.ntp.org for more info.
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Expert Comment

by:aman66
ID: 6967566
use command as below
1)date -s hh:mm:ss
2)/sbin/clock -w


explain:
1)modify time
2)write to Hardware Clock(BIOS)


http://linuxnews.idv.tw/
http://forum.linuxnews.idv.tw/
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6967814
aman66, would you please post your suggestions as comments, and not as answers.
Let the questioner decide to grade the comment of her/his choice as answer.
Please read the EE Policies if unshure.
Thanks (no offence, just a kindly reminder)
0
 

Author Comment

by:dekoay
ID: 7010046
amanda66,

thanx for the answer, but what I need is to set both time and date. Paulqna answer is more accurate as I had solved the problem with its way.
0
 

Expert Comment

by:CleanupPing
ID: 9077040
dekoay:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 9077358
answer depends on the questioner's intent:
  - setting time/date in OS only --> date
     paulqna gave the answer
  - setting time/date in BIOS (independent of Linux): --> date -u   or  hwclock
     ahoffmann gave an answer
0
 
LVL 1

Expert Comment

by:drewber
ID: 9220348
This question has been classified abandoned. I will make a recommendation to the moderators on its resolution in a week or two. I appreciate any comments that would help me to make a recommendation.
 

Unless it is clear to me that the question has been answered I will recommend delete. It is possible that a Grade less than A will be given if no expert makes a case for an A grade. It is assumed that any participant not responding to this request is no longer interested in its final disposition.

 
If the user does not know how to close the question, the options are here:
http://www.experts-exchange.com/help/closing.jsp
 
drewber
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
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 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.:
Suggested Courses

636 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