Solved

LInux Server Time and Date setting

Posted on 2001-07-10
9
351 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
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
 
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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

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…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

746 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now