Solved

LInux Server Time and Date setting

Posted on 2001-07-10
9
366 Views
Last Modified: 2010-04-20
does any one know how to configure the TIme and Date?
as i know, we can easily set it with using linuxconf and under the time and date, but it never shown the Time Zone, my time zone is GMT+800. yet, when i send mail thru my server, the data is early about 5 hours. how come?
please do give me some ideas about this. thank you!
0
Comment
Question by:joelim
[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
9 Comments
 

Author Comment

by:joelim
ID: 6272107
tq
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6272577
use
  date -u
to set the time in the BIOS. Set it to GMT+0, then set your local time using the TZ environment variable in /etc/.profile etc. (also in /etc/rc.config for SuSE).
0
 
LVL 5

Accepted Solution

by:
vsamtani earned 100 total points
ID: 6272644
Actually, date -u does not set the BIOS, but simply sets the software clock according to UTC, or Universal Co-ordinated Time.

You may wish to use rdate to set the time by reference to an external machine on the internet which is acting as an accurate time reference. To do this, run (as root):

rdate -s name.of.time.server.net

(An example of a time server in the UK is ntp.demon.co.uk)

This will set the linux software clock. If you also want to set the hardware (BIOS) clock, you should run:

hwclock --systohc

Vijay
0
Building an interactive eFuture classroom

Watch and learn how ATEN provided a total control system solution including seamless switching matrix switch, HDBaseT extenders, PDU, lighting control to build an interactive eFuture classroom.

 
LVL 51

Expert Comment

by:ahoffmann
ID: 6273175
oops, date -u does not set the BIOS, it just sets the time for the software clock of the kernel, right. The time in RTC (CMOS) must be set using the BIOS menu. Sorry for confusion.
While booting linux, hwclock is called to set the kernel clock according to the RTC, usually. So it is recommended that the RTC runs in UTC.
Unfortunately this causes problems if you have a multi-boot system, for example linux and M$, 'cause M$ doesn't care about the time, means it sets the RTC to if you change the time using M$'s dialogs :-((
0
 

Author Comment

by:joelim
ID: 6275285
how do i set the GMT+800 to my linux redhat server?
i went to /etc/profile, i found nothing but infor about the hostname. how come?
i guess set the time for the software, exspecially the SENDMAIl is good enough. please advice! thanks guys!
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6276153
as I said before, linux reads the time from the RTC (CMOS clock) while booting and uses it as initial value for the kernels software clock (see man clock, man hwclock).
So you first need to set the RTC using the BIOS.
To modify the kernels software clock use
  date -u
All programs (deamons, application) on UNIX/Linux rely on the software clock and the TZ environment variable.
0
 

Expert Comment

by:CleanupPing
ID: 9078751
joelim:
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 7

Expert Comment

by:troopern
ID: 9978127
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:
[Insert recommendation here]
Please leave any comments here within the next seven days.
Accept vsamtani's comment as answer.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

troopern
EE Cleanup Volunteer
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

622 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