?
Solved

red hat linux date problem

Posted on 2003-03-12
4
Medium Priority
?
375 Views
Last Modified: 2013-12-06
In my linux server, the date and time are not the same as the real date and time.
How can I correct it?

My time zone is Hong Kong (HKT).
0
Comment
Question by:stanleyhuen
[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
4 Comments
 
LVL 1

Expert Comment

by:Rahmath
ID: 8118443
Did you used "date" command. if no, use it as the following

     date -s 03/12/2003   in the MM DD YY format. note that if you set the date with this command the time will be resetted. so after that you want to set the time also by,
   
         date -s 04:30:00   Hour : Mins: Secs format

      note that for both we are using the same command and option only the difference is the format ( "/" and ":" ).
0
 

Accepted Solution

by:
knowsth earned 200 total points
ID: 8118544
You would first need to set up the timezone correctly (on RedHat use 'timeconfig').  This copies the correct timezone file to /etc/timezone and sets up /etc/sysconfig/clock.

Then you need to run the 'date' command:
        (for today): "date 200303121115"
sets 2003/03/12 11h15.

Once this has been done then you need to synchronise the hardware to the system time.
         hwclock -w
This ensures that whe you power up, that the hardware supplies the right date/time to the system, and that the system knows how to interpret the timezone information.
0
 

Expert Comment

by:CleanupPing
ID: 9087738
stanleyhuen:
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 2

Expert Comment

by:TheWeakestLink
ID: 9288046
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept comments from knowsth as answer
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TheWeakestLink
EE Cleanup Volunteer
0

Featured Post

Docker-Compose to Simplify Multi-Container Builds

Our veteran DevOps Author takes you through how to build a multi-container environment, managed with a single utility in order to simplify your deployments.

Question has a verified solution.

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

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Fine Tune your automatic Updates for Ubuntu / Debian
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month14 days, 1 hour left to enroll

801 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